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 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