68 lines
3.1 KiB
Python
68 lines
3.1 KiB
Python
# Generated by Django 5.2.7 on 2026-04-06 09:11
|
|
|
|
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=120, unique=True)),
|
|
('slug', models.SlugField(unique=True)),
|
|
('description', models.TextField(blank=True)),
|
|
('sort_order', models.PositiveIntegerField(default=0)),
|
|
],
|
|
options={
|
|
'ordering': ['sort_order', 'name'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Product',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=160)),
|
|
('slug', models.SlugField(unique=True)),
|
|
('short_description', models.CharField(max_length=220)),
|
|
('description', models.TextField()),
|
|
('material', models.CharField(blank=True, max_length=120)),
|
|
('price_from', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('collection_note', models.CharField(blank=True, max_length=180)),
|
|
('is_featured', models.BooleanField(default=False)),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='products', to='core.category')),
|
|
],
|
|
options={
|
|
'ordering': ['name'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ContactInquiry',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=120)),
|
|
('email', models.EmailField(max_length=254)),
|
|
('phone', models.CharField(blank=True, max_length=40)),
|
|
('subject', models.CharField(blank=True, max_length=160)),
|
|
('message', models.TextField()),
|
|
('preferred_contact_method', models.CharField(choices=[('phone', 'Telefon'), ('email', 'E-Mail')], default='phone', max_length=10)),
|
|
('status', models.CharField(choices=[('new', 'Neu'), ('contacted', 'Kontaktiert'), ('closed', 'Abgeschlossen')], default='new', max_length=20)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inquiries', to='core.product')),
|
|
],
|
|
options={
|
|
'ordering': ['-created_at'],
|
|
},
|
|
),
|
|
]
|