60 lines
3.1 KiB
Python
60 lines
3.1 KiB
Python
![]() |
# Generated by Django 5.1.5 on 2025-05-19 08:40
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Creator',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=100)),
|
||
|
('sex', models.CharField(default='男', max_length=10)),
|
||
|
('age', models.IntegerField(default=18)),
|
||
|
('category', models.CharField(max_length=50)),
|
||
|
('followers', models.IntegerField()),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Product',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=100)),
|
||
|
('category', models.CharField(max_length=50)),
|
||
|
('max_price', models.DecimalField(decimal_places=2, max_digits=10)),
|
||
|
('min_price', models.DecimalField(decimal_places=2, max_digits=10)),
|
||
|
('description', models.TextField(blank=True)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Negotiation',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('status', models.CharField(choices=[('brand_review', '品牌回顾'), ('price_negotiation', '价格谈判'), ('contract_review', '合同确认'), ('draft_ready', '准备合同'), ('draft_approved', '合同提交'), ('accepted', '已接受'), ('abandoned', '已放弃')], default='price_negotiation', max_length=20)),
|
||
|
('current_round', models.IntegerField(default=1)),
|
||
|
('context', models.JSONField(default=dict)),
|
||
|
('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='expertproducts.creator')),
|
||
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='expertproducts.product')),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Message',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('role', models.CharField(max_length=10)),
|
||
|
('content', models.TextField()),
|
||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
|
('stage', models.CharField(choices=[('brand_review', '品牌回顾'), ('price_negotiation', '价格谈判'), ('contract_review', '合同确认'), ('draft_ready', '准备合同'), ('draft_approved', '合同提交'), ('accepted', '已接受'), ('abandoned', '已放弃')], default='brand_review', max_length=32)),
|
||
|
('negotiation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='expertproducts.negotiation')),
|
||
|
],
|
||
|
),
|
||
|
]
|