django代码

from django.db import models


# Create your models here.


# 我要提单


class ClientList(models.Model):
    """项目列表"""

    # 借款人基本信息b
    name = models.CharField(u'借款人姓名', max_length=30, blank=False)
    card_id = models.CharField(u'身份证号码', max_length=30, blank=False)

    # 抵押物信息
    house_address = models.CharField(u'抵押物地址', max_length=30, blank=False, null=True)
    house_id = models.CharField(u'房屋产权证编号', max_length=50, blank=False, null=True)
    house_area = models.CharField(u'所在区域', max_length=30, blank=False, null=True)  # 有下拉菜单
    house_type = models.CharField(u'房屋类型', max_length=30, blank=False, null=True)  # 有下拉菜单
    house_use = models.CharField(u'规划用途', max_length=50, blank=False, null=True)  # 有下拉菜单
    floor_space = models.CharField(u'房屋面积(平米)', max_length=10, blank=False, null=True)
    house_tall = models.CharField(u'总层数', max_length=10, blank=False, null=True)
    house_in_tall = models.CharField(u'所在层数', max_length=10, blank=False, null=True)  # 有下拉菜单
    Assessment_of_unit_price = models.CharField(u'评估单价(元)', max_length=20, blank=False, null=True)
    Assessment_of_total_price = models.CharField(u'评估总价(万元)', max_length=20, blank=False, null=True)
    mortgage_rate = models.CharField(u'抵押率(%)', max_length=10, blank=False, null=True)  # 有下拉菜单
    first_amount_of_loan = models.CharField(u'初评贷款金额(万元)', max_length=20, blank=False, null=True)
    owen_by_all = models.CharField(u'是否共有', max_length=10, blank=False, null=True)  # 有下拉菜单
    house_year = models.CharField(u'房龄(年)', max_length=10, blank=False, null=True)

    #  报单信息
    organization = models.CharField(u'助贷机构', max_length=30, blank=False, null=True)
    promote_people = models.CharField(u'推介人', max_length=30, blank=False, null=True)
    maximum_amount = models.CharField(u'信托最大可贷值(万元)', max_length=20, blank=False, null=True)
    apply_sequence = models.CharField(u'申请抵押顺位', max_length=10, blank=False, null=True)  # 有下拉菜单

    #  附件信息,身份证附件、房本附件,需上传

    #  选择产品
    related_products = models.CharField(u'关联产品', max_length=20, blank=False, null=True)  # 有下拉菜单

    # 内部信息
    my_organization = models.CharField(u'提单机构', max_length=10, blank=False, null=True)
    manager = models.CharField(u'客户经理', max_length=10, blank=False, null=True)
    manage_tel = models.CharField(U'客户经理手机号', max_length=11, blank=False, null=True)
    is_pass = models.CharField(u'是否通过', max_length=5, blank=True, null=True)
    not_pass_reason = models.TextField(u'未通过理由', blank=True, null=True)
    submission_time = models.DateTimeField(u'提交时间', auto_now_add=True)

    def __str__(self):
        """shell中显示项"""
        """首页-项目列表-已提单列表-显示项"""
        return self.name

    class Meta:
        verbose_name = '已提单列表'
        verbose_name_plural = verbose_name


class Assign(models.Model):
    """项目指派"""
    lists = models.OneToOneField('ClientList', on_delete=models.CASCADE)
    title = models.CharField(max_length=10, blank=True, null=True)

    class Meta:
        verbose_name = '项目指派'
        verbose_name_plural = verbose_name

 

上一篇:django外键三种多对多关系表的创建


下一篇:UVA 1349 Optimal Bus Route Design 最优公交路线(最小费用流,拆点)