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()
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)
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()
class Actor(Schema): __tablename__ = 'actor' actor_id = Number() first_name = String(45) last_name = String(45) last_update = Timestamp()
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()
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()
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")
class ActorFilm(Schema): __tablename__ = 'actor_film' actor_id = ForeignKey(Integer()) film_id = ForeignKey(Integer()) last_updated = Timestamp()