fix scale and precision in decimal
This commit is contained in:
@ -14,8 +14,8 @@ class Department(ormar.Model):
|
||||
database = database
|
||||
metadata = metadata
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(max_length=100)
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
name: str = ormar.String(max_length=100)
|
||||
|
||||
|
||||
class Course(ormar.Model):
|
||||
@ -23,10 +23,10 @@ class Course(ormar.Model):
|
||||
database = database
|
||||
metadata = metadata
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(max_length=100)
|
||||
completed= ormar.Boolean(default=False)
|
||||
department= ormar.ForeignKey(Department)
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
name: str = ormar.String(max_length=100)
|
||||
completed: bool = ormar.Boolean(default=False)
|
||||
department: Optional[Department] = ormar.ForeignKey(Department)
|
||||
|
||||
|
||||
department = Department(name='Science')
|
||||
|
||||
Reference in New Issue
Block a user