models.py 901 B

123456789101112131415161718192021
  1. from django.db import models
  2. class Company(models.Model):
  3. id = models.IntegerField(unique=True, primary_key=True, verbose_name='公司ID')
  4. name = models.CharField(max_length=128, verbose_name='公司名称')
  5. logo_url = models.CharField(max_length=128, verbose_name='公司标志链接')
  6. certificate_url = models.CharField(max_length=128, verbose_name='营业执照链接')
  7. creator_id = models.CharField(max_length=128, verbose_name='创建者ID')
  8. creator_name = models.CharField(max_length=128,verbose_name='创建者名称')
  9. create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
  10. update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间')
  11. def __str__(self):
  12. return self.name
  13. class Meta:
  14. verbose_name = '被测试软件'
  15. verbose_name_plural = verbose_name
  16. db_table = 'company'