# Generated by Django 5.0.6 on 2026-05-01 14:08

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('properties', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('slug', models.SlugField(blank=True, max_length=280, unique=True)),
                ('description', models.TextField(blank=True)),
                ('source', models.CharField(choices=[('youtube', 'YouTube'), ('vimeo', 'Vimeo'), ('upload', 'Direct Upload')], default='youtube', max_length=20)),
                ('video_url', models.URLField(blank=True, help_text='YouTube or Vimeo URL')),
                ('video_file', models.FileField(blank=True, help_text='Use only for direct uploads', null=True, upload_to='videos/')),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='videos/thumbnails/')),
                ('duration', models.CharField(blank=True, help_text='e.g. 3:45', max_length=20)),
                ('is_featured', models.BooleanField(default=False)),
                ('is_published', models.BooleanField(default=True)),
                ('views_count', models.PositiveIntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('related_property', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='properties.property')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
