0001_initial.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Generated by Django 4.2.8 on 2023-12-26 03:40
  2. from django.db import migrations, models
  3. class Migration(migrations.Migration):
  4. initial = True
  5. dependencies = []
  6. operations = [
  7. migrations.CreateModel(
  8. name="Product",
  9. fields=[
  10. (
  11. "id",
  12. models.BigAutoField(
  13. auto_created=True,
  14. primary_key=True,
  15. serialize=False,
  16. verbose_name="ID",
  17. ),
  18. ),
  19. ("name", models.CharField(max_length=256)),
  20. ("opisanie", models.TextField(max_length=999)),
  21. ("price", models.DecimalField(decimal_places=2, max_digits=50)),
  22. ("image", models.ImageField(upload_to="media/product")),
  23. (
  24. "type",
  25. models.CharField(
  26. choices=[("Услуги", "Услуги"), ("Товари", "Товари")],
  27. max_length=6,
  28. ),
  29. ),
  30. ],
  31. ),
  32. ]