class User(orm.Model): id: orm.Integer(primary_key=True) = None name: orm.String(max_length=100) class Mapping: table_name = "users" metadata = metadata database = database
class Organisation(orm.Model): id: orm.Integer(primary_key=True) = None ident: orm.String(max_length=100) class Mapping: table_name = "org" metadata = metadata database = database
class Member(orm.Model): id: orm.Integer(primary_key=True) = None team: orm.ForeignKey(Team) email: orm.String(max_length=100) class Mapping: table_name = "member" metadata = metadata database = database
class Team(orm.Model): id: orm.Integer(primary_key=True) = None org: orm.ForeignKey(Organisation) name: orm.String(max_length=100) class Mapping: table_name = "team" metadata = metadata database = database
class Product(orm.Model): id: orm.Integer(primary_key=True) = None name: orm.String(max_length=100) rating: orm.Integer(minimum=1, maximum=5) in_stock: orm.Boolean() = False class Mapping: table_name = "products" metadata = metadata database = database
class Track(orm.Model): id: orm.Integer(primary_key=True) = None album: orm.ForeignKey(Album) title: orm.String(max_length=100) position: orm.Integer() class Mapping: table_name = "track" metadata = metadata database = database
class Note(orm.Model): id: orm.Integer(primary_key=True) = None text: orm.String(max_length=100) completed: orm.Boolean() = False number: orm.Decimal(scale=6, precision=20, max_digits=13, decimal_places=6) = '0' class Mapping: table_name = "notes" database = database metadata = metadata