123456789101112131415161718192021222324 |
- from django.db import models
- # Create your models here.
- class FileManager(models.Model):
- id = models.CharField(max_length=128, unique=True, verbose_name='文件id', primary_key=True,
- default='TestLaboratory_V1_File_1')
- path = models.FilePathField(max_length=200, 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)
- # category: software, report, plan_statement, task_statement, case_file
- category = models.CharField(max_length=20, verbose_name='文件类型')
- def __str__(self):
- return self.path
- class Meta:
- verbose_name = '文件管理'
- verbose_name_plural = verbose_name
- db_table = 'file_manager'
|