mirror of
https://github.com/andwati/store-api.git
synced 2026-10-18 09:22:53 +00:00
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
# Generated by Django 5.0.3 on 2024-03-05 22:24
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Product",
|
|
fields=[
|
|
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
|
("name", models.CharField(max_length=100)),
|
|
("description", models.TextField()),
|
|
("sku", models.CharField(max_length=50)),
|
|
("price", models.DecimalField(decimal_places=2, max_digits=10)),
|
|
("quantity", models.IntegerField(default=0)),
|
|
("barcode", models.CharField(blank=True, max_length=100, null=True)),
|
|
("owner", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|