12345678910111213141516171819202122232425 |
- from django.db import models
- # Create your models here.
- from apps.user.models import User
- class Group(models.Model):
- name = models.CharField(max_length=128, verbose_name='组名')
- id = models.CharField(max_length=128, unique=True, primary_key=True, verbose_name='分组id',
- default='TestLaboratory_V1_Group_1')
- code = models.CharField(max_length=12, verbose_name='分组code')
- manager = models.CharField(max_length=60, verbose_name='管理员id')
- users = models.ManyToManyField(User, verbose_name='成员')
- create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
- update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间')
- delete = models.BooleanField(default=False)
- def __str__(self):
- return self.name
- class Meta:
- verbose_name = '被测试软件'
- verbose_name_plural = verbose_name
- db_table = 'group'
|