68 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Python
		
	
	
	
| from django.db import models
 | |
| from utils.model import BaseModel
 | |
| from apps.system.models import CommonAModel, File
 | |
| # Create your models here.
 | |
| 
 | |
| 
 | |
| class Regulatory(CommonAModel):
 | |
|     type_choices = (
 | |
|         (1, '通知'),
 | |
|         (2, '结果')
 | |
|     )
 | |
|     name = models.CharField('名称', max_length=100)
 | |
|     description = models.TextField('描述', default="", blank=True)
 | |
|     file = models.ForeignKey(File, on_delete=models.CASCADE)
 | |
|     provinces=models.CharField('省份', max_length=100, default="",)
 | |
|     type = models.CharField('材料类别', max_length=50,
 | |
|                              choices=type_choices, default=1)
 | |
|     class Meta:
 | |
|         verbose_name = '监管信息'
 | |
|         verbose_name_plural = verbose_name
 | |
| class Professional(CommonAModel):
 | |
|   
 | |
|     field_choices = (
 | |
|         (1, '环保领域'),
 | |
|         (2, '建工建材'),
 | |
|         (3, '食品领域'),
 | |
|         (4, '水利工程'),
 | |
|         (5, '检定校准'),
 | |
|         (6, '其他领域'),
 | |
|     )
 | |
| 
 | |
|     name = models.CharField('名称', max_length=100)
 | |
|     description = models.TextField('描述', default="", blank=True)
 | |
|     professionalfield = models.CharField('领域类别', max_length=50,choices=field_choices, default=1)
 | |
|     file = models.ForeignKey(File, on_delete=models.CASCADE)
 | |
|   
 | |
|     class Meta:
 | |
|         verbose_name = '专业领域要求'
 | |
|         verbose_name_plural = verbose_name
 | |
| class Policy(CommonAModel):
 | |
|   
 | |
|     name = models.CharField('名称', max_length=100)
 | |
|     description = models.TextField('描述', default="", blank=True)
 | |
|     file = models.ForeignKey(File, on_delete=models.CASCADE)
 | |
|   
 | |
|     class Meta:
 | |
|         verbose_name = '政策咨询'
 | |
|         verbose_name_plural = verbose_name
 | |
| class Validation(CommonAModel):
 | |
|     type_choices = (
 | |
|         (1, '通知'),
 | |
|         (2, '结果')
 | |
|     )
 | |
|     filetype_choices = (
 | |
|         (1, '征集通知'),
 | |
|         (2, '结果通报')
 | |
|     )
 | |
|     name = models.CharField('名称', max_length=100)
 | |
|     description = models.TextField('描述', default="", blank=True)
 | |
|     file = models.ForeignKey(File, on_delete=models.CASCADE)
 | |
|     provinces=models.CharField('省份', max_length=100, default="",)
 | |
|     type = models.CharField('材料类别', max_length=50,
 | |
|                              choices=type_choices, default=1)
 | |
|     filetype=models.CharField('文件类型', max_length=50,
 | |
|                              choices=filetype_choices, default=1)
 | |
|     class Meta:
 | |
|         verbose_name = '能力验证'
 | |
|         verbose_name_plural = verbose_name |