完善二期清单

This commit is contained in:
Azmat@qq.com
2026-08-18 14:11:05 +08:00
parent d1ecb52125
commit dfe94a923e
55 changed files with 1754 additions and 137 deletions
@@ -0,0 +1,44 @@
# Generated by Django 5.1.15 on 2026-08-18 03:07
import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0009_team_price_multiplier'),
('projects', '0007_project_soft_delete'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='ScriptTemplate',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=128)),
('presentation_format', models.CharField(blank=True, max_length=32)),
('video_structure', models.CharField(blank=True, max_length=32)),
('persona', models.CharField(blank=True, max_length=32)),
('total_duration', models.PositiveIntegerField(default=0)),
('outline', models.JSONField(blank=True, default=list)),
('cta', models.TextField(blank=True)),
('scenes', models.JSONField(blank=True, default=list)),
('usage_count', models.PositiveIntegerField(default=0)),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_%(class)s_set', to=settings.AUTH_USER_MODEL)),
('source_project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='script_templates', to='projects.project')),
('source_script', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='templates', to='projects.scriptversion')),
('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='accounts.team')),
],
options={
'ordering': ['-created_at'],
'indexes': [models.Index(fields=['team', '-created_at'], name='projects_sc_team_id_da7bc5_idx')],
'constraints': [models.UniqueConstraint(fields=('team', 'name'), name='uniq_script_template_name_per_team')],
},
),
]