You've already forked opc-backend
62 lines
3.2 KiB
Python
62 lines
3.2 KiB
Python
|
|
# Generated by Django 4.2.30 on 2026-04-25 09:46
|
||
|
|
|
||
|
|
from django.db import migrations, models
|
||
|
|
import uuid
|
||
|
|
|
||
|
|
|
||
|
|
class Migration(migrations.Migration):
|
||
|
|
|
||
|
|
initial = True
|
||
|
|
|
||
|
|
dependencies = [
|
||
|
|
]
|
||
|
|
|
||
|
|
operations = [
|
||
|
|
migrations.CreateModel(
|
||
|
|
name='Task',
|
||
|
|
fields=[
|
||
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||
|
|
('title', models.CharField(max_length=256)),
|
||
|
|
('description', models.TextField()),
|
||
|
|
('skill_tags', models.JSONField(default=list)),
|
||
|
|
('budget_min', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
|
||
|
|
('budget_max', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
|
||
|
|
('currency', models.CharField(default='CNY', max_length=8)),
|
||
|
|
('deadline', models.DateField(blank=True, null=True)),
|
||
|
|
('task_type', models.CharField(blank=True, max_length=64, null=True)),
|
||
|
|
('attachments', models.JSONField(default=list)),
|
||
|
|
('status', models.CharField(choices=[('DRAFT', '草稿'), ('OPEN', '已发布'), ('IN_PROGRESS', '进行中'), ('COMPLETED', '已完成'), ('CANCELLED', '已取消')], default='DRAFT', max_length=16)),
|
||
|
|
('assigned_at', models.DateTimeField(blank=True, null=True)),
|
||
|
|
('completed_at', models.DateTimeField(blank=True, null=True)),
|
||
|
|
('completion_note', models.TextField(blank=True, null=True)),
|
||
|
|
('deliverables', models.JSONField(default=list)),
|
||
|
|
('cancelled_at', models.DateTimeField(blank=True, null=True)),
|
||
|
|
('cancel_reason', models.TextField(blank=True, null=True)),
|
||
|
|
('is_deleted', models.BooleanField(default=False)),
|
||
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||
|
|
],
|
||
|
|
options={
|
||
|
|
'db_table': 'tasks',
|
||
|
|
},
|
||
|
|
),
|
||
|
|
migrations.CreateModel(
|
||
|
|
name='TaskApplication',
|
||
|
|
fields=[
|
||
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||
|
|
('cover_letter', models.TextField(blank=True, null=True)),
|
||
|
|
('expected_days', models.IntegerField(blank=True, null=True)),
|
||
|
|
('expected_price', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
|
||
|
|
('attachments', models.JSONField(default=list)),
|
||
|
|
('status', models.CharField(choices=[('PENDING', '待审核'), ('APPROVED', '已通过'), ('REJECTED', '已拒绝'), ('WITHDRAWN', '已撤回')], default='PENDING', max_length=16)),
|
||
|
|
('reject_reason', models.TextField(blank=True, null=True)),
|
||
|
|
('reviewed_at', models.DateTimeField(blank=True, null=True)),
|
||
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||
|
|
],
|
||
|
|
options={
|
||
|
|
'db_table': 'task_applications',
|
||
|
|
},
|
||
|
|
),
|
||
|
|
]
|