You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.7 KiB
63 lines
2.7 KiB
from django.db import models |
|
|
|
# class ProjectStatus(models.TextChoices): |
|
# KICKOUT = 'KICKOUT','立项' |
|
# DESIGN = 'DESIGN', '产品设计' |
|
# DEV = 'DEV', '开发中' |
|
# TEST = 'TEST', '测试中' |
|
# FINISH = 'FINISH', '结测待上线' |
|
# ONLINE = 'ONLINE', '已上线' |
|
# PAUSE = 'PAUSE', '暂停' |
|
# END = 'END', '终止' |
|
|
|
# Create your models here. |
|
class Project(models.Model): |
|
id = models.AutoField(primary_key=True) |
|
project_name = models.CharField(verbose_name='项目名称',max_length=100, help_text='项目名称') |
|
is_delete = models.BooleanField(verbose_name='删除状态', default=False, help_text='删除状态') |
|
|
|
def __str__(self): |
|
return self.project_name |
|
|
|
class Meta: |
|
verbose_name = '项目列表' |
|
verbose_name_plural = '项目列表' |
|
db_table_comment = '项目列表' |
|
db_table = 'prd_project' |
|
|
|
class PrdItem(models.Model): |
|
id = models.AutoField(primary_key=True) |
|
project = models.CharField(verbose_name='所属项目',max_length=100, help_text='所属项目') |
|
prd_version = models.CharField(verbose_name='版本',max_length=200, help_text='版本') |
|
prd_status = models.CharField(verbose_name='版本状态',max_length=200, default='立项', help_text='版本状态') |
|
prd_doc_link = models.CharField(verbose_name='原型地址',max_length=100, help_text='原型地址') |
|
prd_comment = models.TextField(verbose_name='版本描述', help_text='版本描述') |
|
have_history = models.BooleanField(verbose_name='包含历史版本', default=False, help_text='包含历史版本') |
|
is_delete = models.BooleanField(verbose_name='删除状态', default=False, help_text='删除状态') |
|
update_at = models.DateTimeField(verbose_name='最后更新时间', auto_now=True, help_text='最后更新时间') |
|
|
|
def __str__(self): |
|
return self.prd_version |
|
|
|
class Meta: |
|
verbose_name = '版本列表' |
|
verbose_name_plural = '版本列表' |
|
db_table_comment = '版本列表' |
|
db_table = 'prd_item' |
|
|
|
|
|
class PrdHistory(models.Model): |
|
id = models.AutoField(primary_key=True) |
|
prd_id = models.IntegerField(verbose_name='对应版本的id', help_text='对应版本的id') |
|
history_doc_link = models.TextField(verbose_name='历史产品原型链接', help_text='历史产品原型链接') |
|
update_at = models.DateField(verbose_name='最后更新日期', help_text='最后更新日期') |
|
is_delete = models.BooleanField(verbose_name='删除状态', default=False, help_text='删除状态') |
|
|
|
def __str__(self): |
|
return self.history_doc_link |
|
|
|
class Meta: |
|
verbose_name = '历史文档列表' |
|
verbose_name_plural = '历史文档列表' |
|
db_table_comment = '历史文档列表' |
|
db_table = 'prd_history' |