# Generated by Django 6.0.4 on 2026-05-01 09:02

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mediable_type', models.CharField(max_length=100)),
                ('mediable_id', models.PositiveIntegerField()),
                ('source_type', models.CharField(blank=True, max_length=50, null=True)),
                ('storage_type', models.CharField(choices=[('local', 'Local Storage'), ('s3', 'Amazon S3'), ('cloudinary', 'Cloudinary'), ('url', 'External URL')], default='local', max_length=20)),
                ('file_path', models.CharField(blank=True, max_length=2048, null=True)),
                ('full_url', models.URLField(blank=True, max_length=2048, null=True)),
                ('original_file_name', models.CharField(max_length=255)),
                ('file_type', models.CharField(choices=[('image', 'Image'), ('video', 'Video'), ('document', 'Document'), ('audio', 'Audio'), ('other', 'Other')], default='image', max_length=20)),
                ('extension', models.CharField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Media',
                'verbose_name_plural': 'Media',
                'indexes': [models.Index(fields=['mediable_type', 'mediable_id'], name='media_media_mediabl_1d0200_idx'), models.Index(fields=['source_type'], name='media_media_source__f33bd9_idx')],
            },
        ),
    ]
