clean the meta, more tests, partial update of the docs
This commit is contained in:
17
docs_src/relations/docs003.py
Normal file
17
docs_src/relations/docs003.py
Normal 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)
|
||||
Reference in New Issue
Block a user