clean the meta, more tests, partial update of the docs

This commit is contained in:
collerek
2020-12-11 13:13:13 +01:00
parent 2e7cad722b
commit bae2d8e1c8
6 changed files with 240 additions and 25 deletions

View File

@ -0,0 +1,17 @@
class Department(ormar.Model):
class Meta:
database = database
metadata = metadata
id: int = ormar.Integer(primary_key=True)
name: str = ormar.String(max_length=100)
class Course(ormar.Model):
class Meta:
database = database
metadata = metadata
id: int = ormar.Integer(primary_key=True)
name: str = ormar.String(max_length=100)
department: Optional[Union[Department, Dict]] = ormar.ForeignKey(Department)