# Generated by Django 5.0 on 2025-10-26 21:02

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


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0066_project_description_to_html'),
        ('userapp', '0015_alter_costumuser_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='DashboardProject',
            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')),
                ('description', tinymce.models.HTMLField(help_text='Description détaillée du projet', verbose_name='Description')),
                ('status', models.CharField(choices=[('PLANNING', 'En planification'), ('IN_PROGRESS', 'En cours'), ('COMPLETED', 'Terminé'), ('ON_HOLD', 'En pause')], default='PLANNING', max_length=20, verbose_name='Statut')),
                ('start_date', models.DateField(blank=True, null=True, verbose_name='Date de début')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='Date de fin prévue')),
                ('budget', models.BigIntegerField(blank=True, null=True, verbose_name='Budget (FCFA)')),
                ('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')),
                ('assigned_technicians', models.ManyToManyField(blank=True, limit_choices_to={'type': 'TECHNICIEN'}, related_name='assigned_projects', to='userapp.costumuser', verbose_name='Techniciens assignés')),
                ('client', models.ForeignKey(limit_choices_to={'type': 'CLIENT'}, on_delete=django.db.models.deletion.CASCADE, related_name='dashboard_projects', to='userapp.costumuser', verbose_name='Client')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='created_projects', to='userapp.costumuser', verbose_name='Créé par')),
            ],
            options={
                'verbose_name': 'Projet Dashboard',
                'verbose_name_plural': 'Projets Dashboard',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ProjectActivity',
            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 l'activité")),
                ('activity_type', models.CharField(choices=[('FACTURE', 'Facture'), ('NOTE', 'Note'), ('DEVIS', 'Devis'), ('JUSTIFICATIF', 'Justificatif')], max_length=15, verbose_name="Type d'activité")),
                ('description', tinymce.models.HTMLField(help_text="Description détaillée de l'activité", verbose_name='Description')),
                ('is_completed', models.BooleanField(default=False, verbose_name='Activité terminée')),
                ('due_date', models.DateField(blank=True, null=True, verbose_name="Date d'échéance")),
                ('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')),
                ('assigned_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned_activities', to='userapp.costumuser', verbose_name='Assigné à')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='created_activities', to='userapp.costumuser', verbose_name='Créé par')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='app.dashboardproject', verbose_name='Projet')),
            ],
            options={
                'verbose_name': 'Activité Projet',
                'verbose_name_plural': 'Activités Projet',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ActivityVideo',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=200, verbose_name='Titre de la vidéo')),
                ('video_type', models.CharField(choices=[('FILE', 'Fichier uploadé'), ('YOUTUBE', 'YouTube'), ('VIMEO', 'Vimeo')], default='FILE', max_length=10, verbose_name='Type de vidéo')),
                ('video_file', models.FileField(blank=True, null=True, upload_to='dashboard/activities/videos/', verbose_name='Fichier vidéo')),
                ('video_url', models.URLField(blank=True, verbose_name='URL de la vidéo')),
                ('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")),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='videos', to='app.projectactivity', verbose_name='Activité')),
            ],
            options={
                'verbose_name': 'Vidéo Activité',
                'verbose_name_plural': 'Vidéos Activité',
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='ActivityImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='dashboard/activities/images/', 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")),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='app.projectactivity', verbose_name='Activité')),
            ],
            options={
                'verbose_name': 'Image Activité',
                'verbose_name_plural': 'Images Activité',
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='ActivityFile',
            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 fichier')),
                ('file', models.FileField(upload_to='dashboard/activities/files/', verbose_name='Fichier')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('file_size', models.PositiveIntegerField(blank=True, null=True, verbose_name='Taille du fichier (bytes)')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name="Date d'upload")),
                ('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='uploaded_files', to='userapp.costumuser', verbose_name='Uploadé par')),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='app.projectactivity', verbose_name='Activité')),
            ],
            options={
                'verbose_name': 'Fichier Activité',
                'verbose_name_plural': 'Fichiers Activité',
                'ordering': ['-created_at'],
            },
        ),
    ]
