# Generated by Django 4.2.29 on 2026-03-21 09:44

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0010_billing_data_migration'),
        ('generation', '0007_billing_system_v010'),
    ]

    operations = [
        migrations.CreateModel(
            name='AssetGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('remote_group_id', models.CharField(default='', max_length=100, verbose_name='火山Group ID')),
                ('name', models.CharField(default='', max_length=100, verbose_name='角色名')),
                ('description', models.CharField(blank=True, default='', max_length=300, verbose_name='描述')),
                ('thumbnail_url', models.CharField(blank=True, default='', max_length=1000, verbose_name='缩略图URL')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_asset_groups', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='asset_groups', to='accounts.team', verbose_name='所属团队')),
            ],
            options={
                'verbose_name': '素材组',
                'verbose_name_plural': '素材组',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('remote_asset_id', models.CharField(default='', max_length=100, verbose_name='火山Asset ID')),
                ('name', models.CharField(default='', max_length=100, verbose_name='素材名称')),
                ('url', models.CharField(blank=True, default='', max_length=1000, verbose_name='图片URL')),
                ('status', models.CharField(choices=[('processing', '处理中'), ('active', '可用'), ('failed', '失败')], default='processing', max_length=20, verbose_name='状态')),
                ('error_message', models.CharField(blank=True, default='', max_length=500, verbose_name='错误信息')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='generation.assetgroup', verbose_name='所属素材组')),
            ],
            options={
                'verbose_name': '素材',
                'verbose_name_plural': '素材',
                'ordering': ['-created_at'],
            },
        ),
    ]
