Esempio n. 1
0
class Rental(Schema):
    rental_id = Integer()
    rental_date = Timestamp(timezone='GMT+1')
    inventory_id = Integer()
    customer_id = Integer()
    return_date = Timestamp()
    staff_id = Integer(5)
    last_update = Timestamp()
Esempio n. 2
0
class Customer(Schema):
    __tablename__ = 'staff'

    customer_id = Integer()
    store_id = Number(3)
    first_name = String(45)
    last_name = String(45)
    email = String(50)
    address_id = Integer(5)
    activebool = Boolean()
    create_date = Timestamp()
    last_update = Timestamp()
    active = Integer(2)
Esempio n. 3
0
class Payment(Table):
    payment_id = Integer()
    customer_id = Integer(fk="table.column")
    staff_id = Integer(fk="table.column")
    rental_id = Integer(fk="table.column")
    amount = Integer()
    payment_date = Timestamp()
Esempio n. 4
0
class Actor(Schema):
    __tablename__ = 'actor'
    
    actor_id = Number()
    first_name = String(45)
    last_name = String(45)
    last_update = Timestamp()
Esempio n. 5
0
class Film(Schema):
    film_id = Integer()
    title = String(255)
    description = String()
    release_year = Integer()
    language_id = Number(5)  # number of digits allowed
    rental_duration = Number(2)  # number of digits allowed
    rental_rate = Number(4, 2)  # number of digits allowed
    length = Number()
    replacement_cost = Number(5, 2)
    rating = String()
    last_update = Timestamp()
Esempio n. 6
0
class Staff(Schema):
    __tablename__ = 'staff'

    staff_id = Integer()
    first_name = String(45)
    last_name = String(45)
    address_id = Integer(5)
    email = String(50)
    store_id = Number(3)
    active = Boolean()
    username = String(16)
    password = String(50)
    last_update = Timestamp()
    picture = Bytes()
Esempio n. 7
0
class Employee(Schema):
    employee_id = Integer(pk=True)
    manager_id = Integer(fk="employee.employee_id", use="smallint")
    full_name = String()
    created_at = Timestamp(tz="GMT+1")
Esempio n. 8
0
class ActorFilm(Schema):
    __tablename__ = 'actor_film'

    actor_id = ForeignKey(Integer())
    film_id = ForeignKey(Integer())
    last_updated = Timestamp()