# Generated by Django 3.2.25 on 2026-04-17 21:16

import cloudinary_storage.storage
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Evenement',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('titre', models.CharField(max_length=200, verbose_name="Titre de l'événement")),
                ('description', models.TextField(blank=True, verbose_name='Description générale')),
                ('date_debut', models.DateTimeField(verbose_name="Date d'ouverture des votes")),
                ('date_fin', models.DateTimeField(verbose_name='Date de clôture')),
                ('logo', models.ImageField(blank=True, null=True, storage=cloudinary_storage.storage.MediaCloudinaryStorage(), upload_to='logos/')),
                ('is_active', models.BooleanField(default=True, verbose_name='Afficher sur le site')),
            ],
            options={
                'verbose_name': 'Événement',
                'verbose_name_plural': 'Événements',
                'ordering': ['-date_debut'],
            },
        ),
        migrations.CreateModel(
            name='Categorie',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('nom', models.CharField(max_length=100, verbose_name='Nom de la catégorie')),
                ('description', models.TextField(blank=True)),
                ('ordre', models.PositiveIntegerField(default=0, verbose_name="Ordre d'affichage")),
                ('evenement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='categories', to='nominations.evenement')),
            ],
            options={
                'verbose_name': 'Catégorie',
                'verbose_name_plural': 'Catégories',
                'ordering': ['ordre'],
            },
        ),
        migrations.CreateModel(
            name='Candidat',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('nom_complet', models.CharField(max_length=200, verbose_name='Nom du candidat / projet')),
                ('biographie', models.TextField(blank=True, verbose_name='Bio / Présentation')),
                ('photo', models.ImageField(storage=cloudinary_storage.storage.MediaCloudinaryStorage(), upload_to='candidats/')),
                ('ordre', models.PositiveIntegerField(default=0, verbose_name="Ordre d'affichage")),
                ('categorie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='candidats', to='nominations.categorie')),
            ],
            options={
                'verbose_name': 'Candidat',
                'verbose_name_plural': 'Candidats',
                'ordering': ['ordre'],
            },
        ),
    ]
