Exemple #1
0
class GenreEntity(GenreBaseEntity):
    """
    genre entity class.
    """

    _extend_existing = True

    name = CoreColumn('name', Unicode(50), unique=True, nullable=False)
    is_main = CoreColumn('is_main', Boolean, nullable=False, default=False)
Exemple #2
0
class LanguageEntity(LanguageBaseEntity):
    """
    language entity class.
    """

    _extend_existing = True

    name = CoreColumn('name', Unicode(50), nullable=False, unique=True)
Exemple #3
0
class ActorBaseEntity(CoreEntity):
    """
    actor base entity class.
    """

    _table = 'actor'

    person_id = CoreColumn('person_id', Integer, ForeignKey('person.id'),
                           index=True, primary_key=True, autoincrement=False)
Exemple #4
0
class GenreBaseEntity(CoreEntity):
    """
    genre base entity class.
    """

    _table = 'genre'

    id = CoreColumn('id',
                    Integer,
                    index=True,
                    primary_key=True,
                    autoincrement=True)
Exemple #5
0
class PersonBaseEntity(CoreEntity):
    """
    person base entity class.
    """

    _table = 'person'

    id = CoreColumn('id',
                    Integer,
                    index=True,
                    primary_key=True,
                    autoincrement=True)
Exemple #6
0
class LanguageBaseEntity(CoreEntity):
    """
    language base entity class.
    """

    _table = 'language'

    id = CoreColumn('id',
                    Integer,
                    index=True,
                    primary_key=True,
                    autoincrement=True)
Exemple #7
0
class PersonEntity(PersonBaseEntity):
    """
    person entity class.
    """

    _extend_existing = True

    fullname = CoreColumn('fullname', Unicode(200), nullable=False)

    search_name = CoreColumn('search_name',
                             Unicode(200),
                             exposed=False,
                             nullable=False,
                             index=True)

    imdb_page = CoreColumn('imdb_page', Unicode(150), unique=True)

    identifier = CoreColumn('identifier',
                            Unicode(150),
                            exposed=False,
                            unique=True,
                            index=True)

    photo_name = CoreColumn('photo_name', Unicode(250), unique=True)

    add_date = CoreColumn('add_date',
                          TIMESTAMP(timezone=True),
                          nullable=False,
                          default=datetime_services.now)