开发了多角色登录与鉴权接口:实现了普通用户、企业和管理员的登录分流,并支持Token验证。

开发了权限控制接口:实现了通过数据库分配菜单权限节点,控制接口访问安全。
开发了实名认证中心:实现了个人身份证信息与企业营业执照的提交与审核接口。
开发了任务与协作大厅核心业务:实现了任务的发布、接单、状态流转以及专家邀约接口。
配置了全局环境变量与数据库引擎:集成了 PostgreSQL 数据库、Redis 缓存与 MinIO 对象存储。
This commit is contained in:
2026-04-28 16:32:02 +08:00
commit 23855ef0e4
94 changed files with 4950 additions and 0 deletions

32
opc_cert/models.py Normal file
View File

@@ -0,0 +1,32 @@
import uuid
from django.db import models
class CertStatus(models.TextChoices):
PENDING = 'PENDING', '待审核'
APPROVED = 'APPROVED', '已通过'
REJECTED = 'REJECTED', '已驳回'
class OpcCertification(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
user = models.ForeignKey('users.User', on_delete=models.CASCADE, related_name='opc_certifications')
real_name = models.CharField(max_length=64)
id_card = models.TextField(null=True, blank=True)
skills = models.JSONField(default=list)
experience = models.TextField(null=True, blank=True)
resume_url = models.CharField(max_length=512, null=True, blank=True)
attachments = models.JSONField(default=list)
status = models.CharField(max_length=16, choices=CertStatus.choices, default=CertStatus.PENDING)
reject_reason = models.TextField(null=True, blank=True)
reviewer = models.ForeignKey('users.User', on_delete=models.SET_NULL, null=True, blank=True, related_name='reviewed_certifications')
reviewed_at = models.DateTimeField(null=True, blank=True)
rating = models.SmallIntegerField(null=True, blank=True)
rating_tags = models.JSONField(default=list)
rating_note = models.TextField(null=True, blank=True)
rated_by = models.ForeignKey('users.User', on_delete=models.SET_NULL, null=True, blank=True, related_name='rated_certifications')
rated_at = models.DateTimeField(null=True, blank=True)
version = models.SmallIntegerField(default=1)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
db_table = 'opc_certifications'