# Generated by Django 5.1.5 on 2026-08-31 15:40

import django.db.models.deletion
import django.utils.timezone
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='Lead',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=140)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.CharField(blank=True, max_length=40)),
                ('company', models.CharField(blank=True, max_length=140)),
                ('project_type', models.CharField(blank=True, max_length=120)),
                ('has_website', models.CharField(blank=True, max_length=120)),
                ('description', models.TextField(blank=True)),
                ('features', models.CharField(blank=True, max_length=400)),
                ('budget', models.CharField(blank=True, max_length=60)),
                ('timeline', models.CharField(blank=True, max_length=60)),
                ('target_date', models.DateField(blank=True, null=True)),
                ('references', models.TextField(blank=True)),
                ('branding', models.CharField(blank=True, max_length=120)),
                ('source', models.CharField(default='contact', max_length=40)),
                ('reference', models.CharField(blank=True, max_length=20, unique=True)),
                ('status', models.CharField(choices=[('new', 'New'), ('contacted', 'Contacted'), ('quoted', 'Quotation sent'), ('negotiating', 'Negotiating'), ('won', 'Won'), ('lost', 'Lost')], default='new', max_length=20)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='OngoingService',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('covers', models.CharField(max_length=300)),
                ('price', models.CharField(max_length=60)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='PortfolioCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('slug', models.SlugField(unique=True)),
            ],
            options={
                'verbose_name_plural': 'Portfolio categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='PricingPackage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('slug', models.SlugField(unique=True)),
                ('audience', models.CharField(blank=True, max_length=200)),
                ('price', models.CharField(max_length=60)),
                ('price_note', models.CharField(blank=True, max_length=60)),
                ('delivery_time', models.CharField(blank=True, max_length=60)),
                ('features', models.TextField(help_text='One feature per line')),
                ('featured', models.BooleanField(default=False)),
                ('order', models.PositiveIntegerField(default=0)),
                ('published', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='ProcessStep',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('description', models.CharField(max_length=300)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120)),
                ('slug', models.SlugField(unique=True)),
                ('summary', models.CharField(max_length=300)),
                ('included', models.TextField(help_text='One item per line')),
                ('starting_price', models.CharField(blank=True, max_length=60)),
                ('delivery_time', models.CharField(blank=True, max_length=60)),
                ('order', models.PositiveIntegerField(default=0)),
                ('published', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['order', 'title'],
            },
        ),
        migrations.CreateModel(
            name='SiteSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Teniteno1', max_length=100)),
                ('tagline', models.CharField(blank=True, max_length=200)),
                ('logo', models.ImageField(blank=True, upload_to='site/')),
                ('contact_email', models.EmailField(default='hello@teniteno1.com', max_length=254)),
                ('whatsapp', models.CharField(blank=True, max_length=40)),
                ('location', models.CharField(blank=True, max_length=100)),
                ('meta_description', models.TextField(blank=True)),
                ('github_url', models.URLField(blank=True)),
                ('linkedin_url', models.URLField(blank=True)),
                ('x_url', models.URLField(blank=True)),
                ('payment_provider', models.CharField(blank=True, max_length=60)),
                ('payment_mode', models.CharField(default='Live', max_length=10)),
                ('webhook_url', models.CharField(blank=True, max_length=200)),
            ],
            options={
                'verbose_name_plural': 'Site settings',
            },
        ),
        migrations.CreateModel(
            name='Statistic',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(max_length=20)),
                ('label', models.CharField(max_length=60)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Testimonial',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quote', models.TextField()),
                ('author', models.CharField(max_length=100)),
                ('role', models.CharField(blank=True, max_length=140)),
                ('published', models.BooleanField(default=True)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='ActivityLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=300)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='activity', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company', models.CharField(blank=True, max_length=140)),
                ('phone', models.CharField(blank=True, max_length=40)),
                ('address', models.CharField(blank=True, max_length=240)),
                ('status', models.CharField(choices=[('active', 'Active'), ('dormant', 'Dormant'), ('closed', 'Closed')], default='active', max_length=20)),
                ('notify_project_updates', models.BooleanField(default=True)),
                ('notify_invoices', models.BooleanField(default=True)),
                ('notify_payments', models.BooleanField(default=True)),
                ('notify_messages', models.BooleanField(default=True)),
                ('notify_tickets', models.BooleanField(default=True)),
                ('notify_renewals', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='client', to=settings.AUTH_USER_MODEL)),
                ('lead', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='clients', to='core.lead')),
            ],
            options={
                'ordering': ['user__first_name', 'user__last_name'],
            },
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(blank=True, max_length=20, unique=True)),
                ('description', models.CharField(blank=True, max_length=240)),
                ('total', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('sent', 'Sent'), ('partial', 'Partial'), ('paid', 'Paid'), ('overdue', 'Overdue'), ('cancelled', 'Cancelled')], default='draft', max_length=20)),
                ('issued_on', models.DateField(blank=True, null=True)),
                ('due_on', models.DateField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoices', to='core.client')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='InvoiceItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=200)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('order', models.PositiveIntegerField(default=0)),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='core.invoice')),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='LoginEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username_tried', models.CharField(blank=True, max_length=150)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
                ('user_agent', models.CharField(blank=True, max_length=300)),
                ('successful', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='logins', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.CharField(blank=True, max_length=40)),
                ('body', models.CharField(max_length=300)),
                ('url', models.CharField(blank=True, max_length=200)),
                ('read', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='PortfolioProject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=140)),
                ('slug', models.SlugField(unique=True)),
                ('client_name', models.CharField(blank=True, max_length=140)),
                ('summary', models.CharField(max_length=300)),
                ('description', models.TextField(blank=True)),
                ('problem', models.TextField(blank=True)),
                ('features', models.TextField(blank=True, help_text='One feature per line')),
                ('services', models.CharField(blank=True, help_text='Comma separated', max_length=300)),
                ('technologies', models.CharField(blank=True, help_text='Comma separated', max_length=300)),
                ('project_url', models.URLField(blank=True)),
                ('github_url', models.URLField(blank=True)),
                ('completed_on', models.DateField(blank=True, null=True)),
                ('featured', models.BooleanField(default=False)),
                ('published', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='projects', to='core.portfoliocategory')),
            ],
            options={
                'ordering': ['-completed_on', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='PortfolioImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='portfolio/')),
                ('caption', models.CharField(blank=True, max_length=200)),
                ('order', models.PositiveIntegerField(default=0)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='core.portfolioproject')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reference', models.CharField(blank=True, max_length=20, unique=True)),
                ('name', models.CharField(max_length=180)),
                ('slug', models.SlugField(unique=True)),
                ('project_type', models.CharField(blank=True, max_length=120)),
                ('description', models.TextField(blank=True)),
                ('budget', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('status', models.CharField(choices=[('lead', 'Lead'), ('quotation', 'Quotation'), ('awaiting_payment', 'Awaiting payment'), ('planning', 'Planning'), ('design', 'Design'), ('development', 'Development'), ('testing', 'Testing'), ('awaiting_approval', 'Awaiting client approval'), ('deployment', 'Deployment'), ('completed', 'Completed'), ('maintenance', 'Maintenance'), ('cancelled', 'Cancelled')], default='planning', max_length=30)),
                ('progress', models.PositiveIntegerField(default=0)),
                ('start_date', models.DateField(blank=True, null=True)),
                ('deadline', models.DateField(blank=True, null=True)),
                ('developer', models.CharField(blank=True, max_length=120)),
                ('internal_notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='core.client')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('method', models.CharField(choices=[('card', 'Card'), ('transfer', 'Bank transfer'), ('cash', 'Cash')], default='transfer', max_length=20)),
                ('reference', models.CharField(max_length=60, unique=True)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('confirmed', 'Confirmed'), ('failed', 'Failed')], default='pending', max_length=20)),
                ('paid_on', models.DateField(default=django.utils.timezone.localdate)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='core.client')),
                ('invoice', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payments', to='core.invoice')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payments', to='core.project')),
            ],
            options={
                'ordering': ['-paid_on', '-id'],
            },
        ),
        migrations.CreateModel(
            name='Milestone',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=140)),
                ('detail', models.CharField(blank=True, max_length=240)),
                ('status', models.CharField(choices=[('not_started', 'Not started'), ('in_progress', 'In progress'), ('done', 'Completed')], default='not_started', max_length=20)),
                ('due_date', models.DateField(blank=True, null=True)),
                ('completed_on', models.DateField(blank=True, null=True)),
                ('order', models.PositiveIntegerField(default=0)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='milestones', to='core.project')),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField()),
                ('attachment', models.FileField(blank=True, upload_to='messages/')),
                ('read', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='core.client')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sent_messages', to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='messages', to='core.project')),
            ],
            options={
                'ordering': ['created_at'],
            },
        ),
        migrations.AddField(
            model_name='invoice',
            name='project',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='invoices', to='core.project'),
        ),
        migrations.CreateModel(
            name='ProjectFile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='project-files/')),
                ('name', models.CharField(blank=True, max_length=200)),
                ('folder', models.CharField(choices=[('design', 'Designs'), ('document', 'Documents'), ('deliverable', 'Deliverables'), ('contract', 'Contracts')], default='document', max_length=20)),
                ('client_visible', models.BooleanField(default=True)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='core.project')),
            ],
            options={
                'ordering': ['-uploaded_at'],
            },
        ),
        migrations.CreateModel(
            name='ProjectUpdate',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=180)),
                ('body', models.TextField()),
                ('client_visible', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='updates', to='core.project')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Quote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(blank=True, max_length=20, unique=True)),
                ('title', models.CharField(max_length=180)),
                ('notes', models.TextField(blank=True)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('sent', 'Sent'), ('negotiating', 'Negotiating'), ('accepted', 'Accepted'), ('declined', 'Declined'), ('cancelled', 'Cancelled')], default='draft', max_length=20)),
                ('valid_until', models.DateField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='quotes', to='core.client')),
                ('lead', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='quotes', to='core.lead')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='project',
            name='quote',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='projects', to='core.quote'),
        ),
        migrations.CreateModel(
            name='QuoteItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=180)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12)),
                ('order', models.PositiveIntegerField(default=0)),
                ('quote', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='core.quote')),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('priority', models.CharField(choices=[('low', 'Low'), ('normal', 'Normal'), ('high', 'High'), ('critical', 'Critical')], default='normal', max_length=20)),
                ('due_date', models.DateField(blank=True, null=True)),
                ('status', models.CharField(choices=[('todo', 'To do'), ('in_progress', 'In progress'), ('review', 'Review'), ('completed', 'Completed')], default='todo', max_length=20)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='core.project')),
            ],
            options={
                'ordering': ['due_date', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reference', models.CharField(blank=True, max_length=20, unique=True)),
                ('subject', models.CharField(max_length=200)),
                ('message', models.TextField()),
                ('attachment', models.FileField(blank=True, upload_to='tickets/')),
                ('priority', models.CharField(choices=[('low', 'Low'), ('normal', 'Normal'), ('high', 'High'), ('critical', 'Critical')], default='normal', max_length=20)),
                ('status', models.CharField(choices=[('open', 'Open'), ('pending', 'Pending'), ('resolved', 'Resolved')], default='open', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tickets', to='core.client')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tickets', to='core.project')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='TicketReply',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField()),
                ('attachment', models.FileField(blank=True, upload_to='tickets/')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_replies', to=settings.AUTH_USER_MODEL)),
                ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='core.ticket')),
            ],
            options={
                'verbose_name_plural': 'Ticket replies',
                'ordering': ['created_at'],
            },
        ),
        migrations.CreateModel(
            name='Website',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=180)),
                ('slug', models.SlugField(unique=True)),
                ('domain', models.CharField(max_length=180)),
                ('status', models.CharField(choices=[('online', 'Online'), ('offline', 'Offline'), ('suspended', 'Suspended')], default='online', max_length=20)),
                ('built_on', models.DateField(blank=True, null=True)),
                ('last_deployment', models.DateField(blank=True, null=True)),
                ('registrar', models.CharField(blank=True, max_length=120)),
                ('domain_expiry', models.DateField(blank=True, null=True)),
                ('auto_renew', models.BooleanField(default=True)),
                ('dns_notes', models.TextField(blank=True)),
                ('hosting_provider', models.CharField(blank=True, max_length=140)),
                ('hosting_plan', models.CharField(blank=True, max_length=120)),
                ('hosting_expiry', models.DateField(blank=True, null=True)),
                ('server_reference', models.CharField(blank=True, max_length=120)),
                ('deployment_notes', models.TextField(blank=True)),
                ('backend', models.CharField(blank=True, max_length=180)),
                ('frontend', models.CharField(blank=True, max_length=180)),
                ('database', models.CharField(blank=True, max_length=120)),
                ('apis', models.CharField(blank=True, max_length=240)),
                ('ssl_provider', models.CharField(blank=True, max_length=120)),
                ('ssl_expiry', models.DateField(blank=True, null=True)),
                ('maintenance_status', models.CharField(choices=[('active', 'Active'), ('lapsed', 'Lapsed'), ('none', 'No plan')], default='none', max_length=20)),
                ('last_update', models.DateField(blank=True, null=True)),
                ('next_maintenance', models.DateField(blank=True, null=True)),
                ('maintenance_notes', models.TextField(blank=True)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='websites', to='core.client')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='websites', to='core.project')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='ticket',
            name='website',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tickets', to='core.website'),
        ),
        migrations.CreateModel(
            name='CalendarEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('kind', models.CharField(blank=True, max_length=40)),
                ('date', models.DateField()),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='core.project')),
                ('website', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='core.website')),
            ],
            options={
                'ordering': ['date'],
            },
        ),
        migrations.CreateModel(
            name='WebsiteActivity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=240)),
                ('happened_on', models.DateField(default=django.utils.timezone.localdate)),
                ('website', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activity', to='core.website')),
            ],
            options={
                'verbose_name_plural': 'Website activity',
                'ordering': ['-happened_on', '-id'],
            },
        ),
        migrations.CreateModel(
            name='WebsiteCredential',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(max_length=140)),
                ('vault_reference', models.CharField(help_text='Key in the secret store, not the secret itself', max_length=200)),
                ('held_by_client', models.BooleanField(default=False)),
                ('notes', models.CharField(blank=True, max_length=240)),
                ('website', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='credentials', to='core.website')),
            ],
            options={
                'ordering': ['label'],
            },
        ),
    ]
