Пример #1
0
class ProjectInfo(BaseTable):
    create_time = models.DateTimeField('创建时间',
                                       blank=True,
                                       default=timezone.now)

    class Meta:
        verbose_name = "工程目录表"
        db_table = 'project_info'
        permissions = (
            (AUTH_VIEW, 'View project'),
            (AUTH_UPDATE, 'Update project'),
            (AUTH_DELETE, 'Delete project'),
        )

    project_name = models.CharField('项目名称', max_length=50)
    responsible_name = models.CharField('负责人', max_length=20)
    test_user = models.CharField('测试人员', max_length=100)
    dev_user = models.CharField('开发人员', max_length=100)
    publish_app = models.CharField('发布应用', max_length=60)
    simple_desc = models.CharField('简要描述', max_length=100, null=True)
    other_desc = models.CharField('其他信息', max_length=100, null=True)
    is_delete = models.BooleanField('是否已被删除', default=False)

    objects = ProjectInfoManager()

    def delete(self, *args, **kwargs):
        self.is_delete = True
        super(ProjectInfo, self).save(args, kwargs)

    def __str__(self):
        return self.project_name
Пример #2
0
class ProjectInfo(BaseTable):
    class Meta:
        verbose_name = '项目信息'
        db_table = 'ProjectInfo'

    project_name = models.CharField('项目名称', max_length=50)
    responsible_name = models.CharField('负责人', max_length=20)
    test_user = models.CharField('测试人员', max_length=100)
    dev_user = models.CharField('开发人员', max_length=100)
    publish_app = models.CharField('发布应用', max_length=60)
    simple_desc = models.CharField('简要描述', max_length=100, null=True)
    other_desc = models.CharField('其他信息', max_length=100, null=True)
    objects = ProjectInfoManager()
Пример #3
0
class ProjectInfo(BaseTable):
    class Meta:
        verbose_name = '项目信息'
        db_table = 'ProjectInfo'

    pro_name = models.CharField(max_length=50)
    responsible_name = models.CharField(max_length=20)
    test_user = models.CharField(max_length=100)
    dev_user = models.CharField(max_length=100)
    publish_app = models.CharField(max_length=60)
    simple_desc = models.CharField(max_length=100, null=True)
    other_desc = models.CharField(max_length=100, null=True)
    status = models.IntegerField(default=1)
    objects = ProjectInfoManager()
Пример #4
0
class ProjectInfo(models.Model):
    class Meta:
        db_table = 'ProjectInfo'

    pro_name = models.CharField(max_length=50)
    responsible_name = models.CharField(max_length=20)
    test_user = models.CharField(max_length=100)
    dev_user = models.CharField(max_length=100)
    publish_app = models.CharField(max_length=60)
    simple_desc = models.CharField(max_length=100, null=True)
    other_desc = models.CharField(max_length=100, null=True)
    status = models.IntegerField(default=1)
    create_time = models.DateTimeField(auto_now_add=True)
    update_time = models.DateTimeField(auto_now=True)
    objects = ProjectInfoManager()
Пример #5
0
class ProjectInfo(BaseTable):
    class Meta:
        verbose_name = '项目信息'
        db_table = 'ProjectInfo'

    project_name = models.CharField('项目名称', max_length=50, unique=True, null=False)
    responsible_name = models.CharField('负责人', max_length=20, null=False)
    test_user = models.CharField('测试人员', max_length=100, null=False)
    dev_user = models.CharField('开发人员', max_length=100, null=False)
    publish_app = models.CharField('发布应用', max_length=100, null=False)
    simple_desc = models.CharField('简要描述', max_length=100, null=True)
    other_desc = models.CharField('其他信息', max_length=100, null=True)

    config_id = models.IntegerField('关联配置id', null=True)

    creator = models.CharField('创建人', max_length=20, null=False)

    objects = ProjectInfoManager()