38936-vm/core/migrations/0001_initial.py
2026-03-02 15:46:47 +00:00

47 lines
2.2 KiB
Python

# Generated by Django 5.2.7 on 2026-03-02 15:41
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Deal',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('deal_type', models.CharField(choices=[('flight', 'Flight'), ('points', 'Points/Miles')], default='flight', max_length=20)),
('origin', models.CharField(blank=True, max_length=100)),
('destination', models.CharField(max_length=100)),
('current_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
('original_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
('points_required', models.PositiveIntegerField(blank=True, null=True)),
('description', models.TextField()),
('image_url', models.URLField(blank=True, max_length=500)),
('is_published', models.BooleanField(default=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('source_url', models.URLField(blank=True, max_length=500)),
],
),
migrations.CreateModel(
name='Lead',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('email', models.EmailField(max_length=254)),
('phone', models.CharField(blank=True, max_length=20)),
('message', models.TextField(blank=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('deal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leads', to='core.deal')),
],
),
]