42 lines
1.6 KiB
Python
42 lines
1.6 KiB
Python
# Generated by Django 5.2.7 on 2026-02-07 11:04
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Category',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=100)),
|
|
('slug', models.SlugField(unique=True)),
|
|
('icon', models.CharField(default='bi-tag', help_text='Bootstrap icon class', max_length=50)),
|
|
],
|
|
options={
|
|
'verbose_name_plural': 'Categories',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Product',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=200)),
|
|
('slug', models.SlugField(unique=True)),
|
|
('description', models.TextField()),
|
|
('price', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('image_url', models.URLField(blank=True, max_length=500)),
|
|
('is_featured', models.BooleanField(default=False)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='core.category')),
|
|
],
|
|
),
|
|
]
|