From cf5ab840b4f9ec9d526bac21b72a9090b022c626 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Wed, 22 Sep 2021 13:59:08 +0800 Subject: [PATCH] tijiao --- hb_server/apps/sam/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hb_server/apps/sam/models.py b/hb_server/apps/sam/models.py index 247e3e9..4683844 100644 --- a/hb_server/apps/sam/models.py +++ b/hb_server/apps/sam/models.py @@ -31,10 +31,17 @@ class Contract(CommonAModel): """ 合同信息 """ + state_choices = ( + (0, '完好'), + (1, '限用'), + (2, '在修'), + (3, '禁用') + ) name = models.CharField('合同名称', max_length=100) number = models.CharField('合同编号', max_length=100, unique=True) amount = models.IntegerField('合同金额', default=0) invoice = models.IntegerField('开票金额', default=0) + #state = models.CharField('合同状态', choices= state_choices, max_length=20, default=1) customer = models.ForeignKey(Customer, verbose_name='关联客户', on_delete=models.CASCADE, related_name='contact_customer') sign_date = models.DateField('签订日期') description = models.CharField('描述', max_length=200, blank=True, null=True)