restore typing in tests and docs, remove unused metaclass code
This commit is contained in:
@ -18,8 +18,8 @@ class Department(ormar.Model):
|
||||
metadata = metadata
|
||||
database = database
|
||||
|
||||
id = ormar.Integer(primary_key=True, autoincrement=False)
|
||||
name = ormar.String(max_length=100)
|
||||
id: int = ormar.Integer(primary_key=True, autoincrement=False)
|
||||
name: str = ormar.String(max_length=100)
|
||||
|
||||
|
||||
class SchoolClass(ormar.Model):
|
||||
@ -28,8 +28,8 @@ class SchoolClass(ormar.Model):
|
||||
metadata = metadata
|
||||
database = database
|
||||
|
||||
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 Category(ormar.Model):
|
||||
@ -38,9 +38,9 @@ class Category(ormar.Model):
|
||||
metadata = metadata
|
||||
database = database
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(max_length=100)
|
||||
department = ormar.ForeignKey(Department, nullable=False)
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
name: str = ormar.String(max_length=100)
|
||||
department: Optional[Department] = ormar.ForeignKey(Department, nullable=False)
|
||||
|
||||
|
||||
class Student(ormar.Model):
|
||||
@ -49,10 +49,10 @@ class Student(ormar.Model):
|
||||
metadata = metadata
|
||||
database = database
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(max_length=100)
|
||||
schoolclass = ormar.ForeignKey(SchoolClass)
|
||||
category = ormar.ForeignKey(Category, nullable=True)
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
name: str = ormar.String(max_length=100)
|
||||
schoolclass: Optional[SchoolClass] = ormar.ForeignKey(SchoolClass)
|
||||
category: Optional[Category] = ormar.ForeignKey(Category, nullable=True)
|
||||
|
||||
|
||||
class Teacher(ormar.Model):
|
||||
@ -61,10 +61,10 @@ class Teacher(ormar.Model):
|
||||
metadata = metadata
|
||||
database = database
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(max_length=100)
|
||||
schoolclass = ormar.ForeignKey(SchoolClass)
|
||||
category = ormar.ForeignKey(Category, nullable=True)
|
||||
id: int = ormar.Integer(primary_key=True)
|
||||
name: str = ormar.String(max_length=100)
|
||||
schoolclass: Optional[SchoolClass] = ormar.ForeignKey(SchoolClass)
|
||||
category: Optional[Category] = ormar.ForeignKey(Category, nullable=True)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
||||
Reference in New Issue
Block a user