first commit
This commit is contained in:
77
autoapp/migrations/0001_initial.py
Normal file
77
autoapp/migrations/0001_initial.py
Normal file
@@ -0,0 +1,77 @@
|
||||
# Generated by Django 5.2.11 on 2026-02-22 06:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="Auto",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
(
|
||||
"brand",
|
||||
models.CharField(
|
||||
help_text="Например: Toyota, BMW, Lada",
|
||||
max_length=100,
|
||||
verbose_name="Марка",
|
||||
),
|
||||
),
|
||||
(
|
||||
"model",
|
||||
models.CharField(
|
||||
help_text="Например: Camry, X5, Granta",
|
||||
max_length=100,
|
||||
verbose_name="Модель",
|
||||
),
|
||||
),
|
||||
(
|
||||
"year",
|
||||
models.PositiveIntegerField(
|
||||
help_text="Год выпуска автомобиля (например, 2023)",
|
||||
verbose_name="Год выпуска",
|
||||
),
|
||||
),
|
||||
(
|
||||
"color",
|
||||
models.CharField(
|
||||
blank=True,
|
||||
default="Не указан",
|
||||
help_text="Например: чёрный, серебристый, красный",
|
||||
max_length=50,
|
||||
verbose_name="Цвет",
|
||||
),
|
||||
),
|
||||
(
|
||||
"created_at",
|
||||
models.DateTimeField(
|
||||
auto_now_add=True, verbose_name="Дата создания записи"
|
||||
),
|
||||
),
|
||||
(
|
||||
"updated_at",
|
||||
models.DateTimeField(
|
||||
auto_now=True, verbose_name="Дата последнего изменения"
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "Автомобиль",
|
||||
"verbose_name_plural": "Автомобили",
|
||||
"ordering": ["-year", "brand", "model"],
|
||||
},
|
||||
),
|
||||
]
|
||||
0
autoapp/migrations/__init__.py
Normal file
0
autoapp/migrations/__init__.py
Normal file
BIN
autoapp/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
autoapp/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
BIN
autoapp/migrations/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
autoapp/migrations/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user