# Generated by Django 5.0 on 2025-10-16 20:18

import django.db.models.deletion
import tinymce.models
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0063_customer_simulation'),
        ('userapp', '0014_remove_costumuser_customer_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='BlogCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Nom de la catégorie')),
                ('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('color', models.CharField(default='#3B82F6', help_text="Couleur d'affichage de la catégorie (ex: #3B82F6)", max_length=7, verbose_name='Couleur (hex)')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
            ],
            options={
                'verbose_name': 'Catégorie de blog',
                'verbose_name_plural': 'Catégories de blog',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ProjectCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Nom de la catégorie')),
                ('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('icon', models.CharField(blank=True, help_text="Nom de l'icône (ex: home, building, etc.)", max_length=50, verbose_name='Icône')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
            ],
            options={
                'verbose_name': 'Catégorie de projet',
                'verbose_name_plural': 'Catégories de projet',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Titre')),
                ('slug', models.SlugField(max_length=200, unique=True, verbose_name='Slug')),
                ('excerpt', models.TextField(help_text="Résumé court de l'article (max 300 caractères)", max_length=300, verbose_name='Extrait')),
                ('content', tinymce.models.HTMLField(verbose_name='Contenu')),
                ('featured_image', models.ImageField(blank=True, null=True, upload_to='blog/images/', verbose_name='Image à la une')),
                ('status', models.CharField(choices=[('DRAFT', 'Brouillon'), ('PUBLISHED', 'Publié'), ('ARCHIVED', 'Archivé')], default='DRAFT', max_length=20, verbose_name='Statut')),
                ('featured', models.BooleanField(default=False, verbose_name='Article en vedette')),
                ('views_count', models.PositiveIntegerField(default=0, verbose_name='Nombre de vues')),
                ('tags', models.CharField(blank=True, help_text='Séparez les tags par des virgules', max_length=500, verbose_name='Tags')),
                ('meta_description', models.CharField(blank=True, help_text='Description pour les moteurs de recherche (max 160 caractères)', max_length=160, verbose_name='Meta description')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Dernière modification')),
                ('published_at', models.DateTimeField(blank=True, null=True, verbose_name='Date de publication')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_posts', to='userapp.costumuser', verbose_name='Auteur')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='posts', to='app.blogcategory', verbose_name='Catégorie')),
            ],
            options={
                'verbose_name': 'Article de blog',
                'verbose_name_plural': 'Articles de blog',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Titre du projet')),
                ('slug', models.SlugField(max_length=200, unique=True, verbose_name='Slug')),
                ('description', models.TextField(verbose_name='Description')),
                ('short_description', models.CharField(help_text='Description courte pour les aperçus', max_length=200, verbose_name='Description courte')),
                ('location', models.CharField(max_length=200, verbose_name='Localisation')),
                ('client_name', models.CharField(blank=True, help_text='Optionnel, peut être anonymisé', max_length=200, verbose_name='Nom du client')),
                ('surface_built', models.PositiveIntegerField(blank=True, null=True, verbose_name='Surface construite (m²)')),
                ('surface_land', models.PositiveIntegerField(blank=True, null=True, verbose_name='Surface terrain (m²)')),
                ('floors_count', models.CharField(blank=True, help_text='Ex: RDC, R+1, R+2, etc.', max_length=20, verbose_name="Nombre d'étages")),
                ('rooms_count', models.PositiveIntegerField(blank=True, null=True, verbose_name='Nombre de pièces')),
                ('start_date', models.DateField(blank=True, null=True, verbose_name='Date de début')),
                ('completed_date', models.DateField(blank=True, null=True, verbose_name='Date de fin/livraison')),
                ('budget', models.BigIntegerField(blank=True, help_text='Budget du projet en FCFA', null=True, verbose_name='Budget (FCFA)')),
                ('status', models.CharField(choices=[('PLANNING', 'En planification'), ('IN_PROGRESS', 'En cours'), ('COMPLETED', 'Terminé'), ('ON_HOLD', 'En pause')], default='COMPLETED', max_length=20, verbose_name='Statut')),
                ('featured', models.BooleanField(default=False, verbose_name='Projet en vedette')),
                ('published', models.BooleanField(default=True, verbose_name='Publié')),
                ('main_image', models.ImageField(upload_to='projects/images/', verbose_name='Image principale')),
                ('views_count', models.PositiveIntegerField(default=0, verbose_name='Nombre de vues')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Dernière modification')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='projects', to='app.projectcategory', verbose_name='Catégorie')),
            ],
            options={
                'verbose_name': 'Projet/Réalisation',
                'verbose_name_plural': 'Projets/Réalisations',
                'ordering': ['-completed_date', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ProjectImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='projects/gallery/', verbose_name='Image')),
                ('title', models.CharField(blank=True, max_length=200, verbose_name="Titre de l'image")),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('order', models.PositiveIntegerField(default=0, verbose_name="Ordre d'affichage")),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name="Date d'ajout")),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='app.project', verbose_name='Projet')),
            ],
            options={
                'verbose_name': 'Image de projet',
                'verbose_name_plural': 'Images de projet',
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='ProjectVideo',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Titre de la vidéo')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('video_type', models.CharField(choices=[('UPLOAD', 'Fichier uploadé'), ('YOUTUBE', 'YouTube'), ('VIMEO', 'Vimeo')], default='UPLOAD', max_length=20, verbose_name='Type de vidéo')),
                ('video_file', models.FileField(blank=True, help_text='Pour les vidéos uploadées', null=True, upload_to='projects/videos/', verbose_name='Fichier vidéo')),
                ('video_url', models.URLField(blank=True, help_text='Pour YouTube ou Vimeo', verbose_name='URL de la vidéo')),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='projects/video_thumbnails/', verbose_name='Miniature de la vidéo')),
                ('order', models.PositiveIntegerField(default=0, verbose_name="Ordre d'affichage")),
                ('duration', models.CharField(blank=True, help_text='Ex: 2:30', max_length=10, verbose_name='Durée')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name="Date d'ajout")),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='videos', to='app.project', verbose_name='Projet')),
            ],
            options={
                'verbose_name': 'Vidéo de projet',
                'verbose_name_plural': 'Vidéos de projet',
                'ordering': ['order'],
            },
        ),
    ]
