Files
GNX-WEB/gnx-react/backend/policies/migrations/0001_initial.py
Iliyan Angelov dd8eb1c7aa update
2025-10-09 00:44:15 +03:00

55 lines
2.7 KiB
Python

# Generated by Django 4.2.7 on 2025-10-08 13:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Policy',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('type', models.CharField(choices=[('privacy', 'Privacy Policy'), ('terms', 'Terms of Use'), ('support', 'Support Policy')], help_text='Type of policy document', max_length=50, unique=True)),
('title', models.CharField(help_text='Title of the policy', max_length=200)),
('slug', models.SlugField(blank=True, max_length=100, unique=True)),
('description', models.TextField(blank=True, help_text='Brief description of the policy')),
('last_updated', models.DateField(auto_now=True, help_text='Last update date')),
('version', models.CharField(default='1.0', help_text='Policy version number', max_length=20)),
('is_active', models.BooleanField(default=True, help_text='Whether this policy is currently active')),
('effective_date', models.DateField(help_text='Date when this policy becomes effective')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],
options={
'verbose_name': 'Policy',
'verbose_name_plural': 'Policies',
'ordering': ['type'],
},
),
migrations.CreateModel(
name='PolicySection',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('heading', models.CharField(help_text='Section heading', max_length=300)),
('content', models.TextField(help_text='Section content')),
('order', models.IntegerField(default=0, help_text='Display order of sections')),
('is_active', models.BooleanField(default=True, help_text='Whether this section is currently active')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('policy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sections', to='policies.policy')),
],
options={
'verbose_name': 'Policy Section',
'verbose_name_plural': 'Policy Sections',
'ordering': ['policy', 'order'],
},
),
]