You've already forked opc-backend
开发了权限控制接口:实现了通过数据库分配菜单权限节点,控制接口访问安全。 开发了实名认证中心:实现了个人身份证信息与企业营业执照的提交与审核接口。 开发了任务与协作大厅核心业务:实现了任务的发布、接单、状态流转以及专家邀约接口。 配置了全局环境变量与数据库引擎:集成了 PostgreSQL 数据库、Redis 缓存与 MinIO 对象存储。
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',
|
|
},
|
|
),
|
|
]
|