13 lines
413 B
Python
13 lines
413 B
Python
![]() |
from django.db import models
|
||
|
|
||
|
class Car(models.Model):
|
||
|
mark = models.CharField(max_length=150)
|
||
|
model = models.CharField(max_length=150)
|
||
|
mileage = models.PositiveIntegerField()
|
||
|
production_year = models.PositiveSmallIntegerField()
|
||
|
engine_capacity = models.DecimalField()
|
||
|
combustion = models.DecimalField()
|
||
|
price = models.DecimalField()
|
||
|
|
||
|
def __str__(self) -> str:
|
||
|
return "Car"
|