# Generated by Django 6.0.4 on 2026-06-07 01:16

import apps.meetings.models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('events', '0004_alter_event_event_type'),
        ('projects', '0006_funddocument'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='MeetingRoom',
            fields=[
                ('id', models.UUIDField(default=apps.meetings.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('location', models.CharField(blank=True, max_length=255)),
                ('capacity', models.IntegerField(blank=True, null=True)),
                ('facilities', models.JSONField(blank=True, default=list)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Meeting room',
                'verbose_name_plural': 'Meeting rooms',
                'db_table': 'meeting_rooms',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Meeting',
            fields=[
                ('id', models.UUIDField(default=apps.meetings.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('status', models.CharField(choices=[('scheduled', 'Scheduled'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='scheduled', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('attendees', models.ManyToManyField(blank=True, related_name='meetings', to=settings.AUTH_USER_MODEL)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='meetings', to='events.event')),
                ('organizer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organized_meetings', to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='meetings', to='projects.project')),
                ('room', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='meetings', to='meetings.meetingroom')),
            ],
            options={
                'db_table': 'meetings',
                'ordering': ['-start_time'],
                'indexes': [models.Index(fields=['room', 'start_time', 'end_time'], name='meetings_room_id_ede827_idx'), models.Index(fields=['project', 'start_time'], name='meetings_project_bd3d78_idx'), models.Index(fields=['event', 'start_time'], name='meetings_event_i_3dc572_idx')],
            },
        ),
    ]
