| 26 | |
| 27 | |
| 28 | class Car(ormar.Model): |
| 29 | ormar_config = ormar_base_config.copy(tablename="cars") |
| 30 | |
| 31 | id: int = ormar.Integer(primary_key=True) |
| 32 | manufacturer = ormar.ForeignKey(Company) |
| 33 | name: str = ormar.String(max_length=100) |
| 34 | year: int = ormar.Integer(nullable=True) |
| 35 | gearbox_type: str = ormar.String(max_length=20, nullable=True) |
| 36 | gears: int = ormar.Integer(nullable=True) |
| 37 | aircon_type: str = ormar.String(max_length=20, nullable=True) |
| 38 | |
| 39 | |
| 40 | @create_drop_database(base_config=ormar_base_config) |