<s> from __future__ import unicode_literals <EOL> from sqlalchemy import Column <EOL> from sqlalchemy import Integer <EOL> from sqlalchemy import Unicode <EOL> from sqlalchemy import UnicodeText <EOL> from sqlalchemy import Boolean <EOL> from sqlalchemy . schema import ForeignKey <EOL> from sqlalchemy . orm import relationship <EOL> from . base import DeclarativeBase <EOL> from . base import UTCDateTime <EOL> from . base import now_func <EOL> from . . enum import DeclEnum <EOL> class PlanType ( DeclEnum ) : <EOL> DEBIT = '<STR_LIT>' , '<STR_LIT>' <EOL> CREDIT = '<STR_LIT>' , '<STR_LIT>' <EOL> class PlanFrequency ( DeclEnum ) : <EOL> DAILY = '<STR_LIT>' , '<STR_LIT>' <EOL> WEEKLY = '<STR_LIT>' , '<STR_LIT>' <EOL> MONTHLY = '<STR_LIT>' , '<STR_LIT>' <EOL> YEARLY = '<STR_LIT>' , '<STR_LIT>' <EOL> class Plan ( DeclarativeBase ) : <EOL> """<STR_LIT>""" <EOL> __tablename__ = '<STR_LIT>' <EOL> guid = Column ( Unicode ( <NUM_LIT:64> ) , primary_key = True ) <EOL> company_guid = Column ( <EOL> Unicode ( <NUM_LIT:64> ) , <EOL> ForeignKey ( <EOL> '<STR_LIT>' , <EOL> ondelete = '<STR_LIT>' , onupdate = '<STR_LIT>' <EOL> ) , <EOL> index = True , <EOL> nullable = False , <EOL> ) <EOL> plan_type = Column ( PlanType . db_type ( ) , nullable = False , index = True ) <EOL> external_id = Column ( Unicode ( <NUM_LIT> ) , index = True ) <EOL> name = Column ( Unicode ( <NUM_LIT> ) ) <EOL> description = Column ( UnicodeText ) <EOL> amount = Column ( Integer , nullable = False ) <EOL> frequency = Column ( PlanFrequency . db_type ( ) , nullable = False ) <EOL> interval = Column ( Integer , nullable = False , default = <NUM_LIT:1> ) <EOL> deleted = Column ( Boolean , default = False , nullable = False ) <EOL> created_at = Column ( UTCDateTime , default = now_func ) <EOL> updated_at = Column ( UTCDateTime , default = now_func ) <EOL> subscriptions = relationship ( '<STR_LIT>' , cascade = '<STR_LIT>' , <EOL> backref = '<STR_LIT>' ) <EOL> __all__ = [ <EOL> PlanType . __name__ , <EOL> PlanFrequency . __name__ , <EOL> Plan . __name__ , <EOL> ] </s>
