g214/results/models.py

89 lines
3.6 KiB
Python
Raw Normal View History

2018-08-20 08:21:25 +00:00
# coding:utf-8
from __future__ import unicode_literals
from django.db import models
import uuid
# Create your models here.
class Paper(models.Model):
CATEGORY_CHOICES = ((1, u'论文论著'),)
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
created = models.DateField(u'创建日期', auto_now_add=True)
updated = models.DateField(u'更新日期', auto_now=True)
category = models.IntegerField(u'分类', choices=CATEGORY_CHOICES)
number = models.IntegerField(u'序号', blank=True)
result_type = models.CharField(u'成果类型', max_length=128, blank=True)
result_name = models.CharField(u'成果名称', max_length=128, blank=True)
people = models.CharField(U'完成人', max_length=128, blank=True)
publication = models.CharField(u'刊物名称', max_length=128, blank=True)
publication_time = models.CharField(u'刊物日期', max_length=128)
def __unicode__(self):
return self.result_name
class Meta:
verbose_name_plural=u'论文论著'
class WinResult(models.Model):
CATEGORY_CHOICES = ((2, u'获奖成果'),)
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
created = models.DateField(u'创建日期', auto_now_add=True)
updated = models.DateField(u'更新日期', auto_now=True)
category = models.IntegerField(u'分类', choices=CATEGORY_CHOICES)
number = models.IntegerField(u'序号')
result_name = models.CharField(u'成果名称', max_length=128, blank=True)
direction = models.CharField(u'研究方向', max_length=128, blank=True)
level = models.CharField(u'获奖等级', max_length=128, blank=True)
win_time = models.CharField(u'获奖时间', max_length=128)
people = models.CharField(u'参与人', max_length=128, blank=True, )
def __unicode__(self):
return self.result_name
class Meta:
verbose_name_plural=u'获奖成果'
class ResultStandard(models.Model):
CATEGORY_CHOICES = ((3, u'论文纳入标准'),)
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
created = models.DateField(u'创建日期', auto_now_add=True)
updated = models.DateField(u'更新日期', auto_now=True)
category = models.IntegerField(u'分类', choices=CATEGORY_CHOICES)
number = models.IntegerField(u'序号')
result_name = models.CharField(u'成果名称', max_length=128, blank=True)
direction = models.CharField(u'研究方向', max_length=128, blank=True)
standard = models.CharField(u'标准名称', max_length=128, blank=True)
included_time = models.CharField(u'纳入时间', max_length=128)
def __unicode__(self):
return self.result_name
class Meta:
verbose_name_plural=u'论文纳入标准'
class Patent(models.Model):
CATEGORY_CHOICES = ((4, u'专利申请'),
(5, u'专利授权'),
)
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
created = models.DateField(u'创建日期', auto_now_add=True)
updated = models.DateField(u'更新时间', auto_now=True)
category = models.IntegerField(u'分类', choices=CATEGORY_CHOICES)
number = models.IntegerField(u'序号', blank=True)
patent = models.CharField(u'专利名称', max_length=128, blank=True)
patent_number = models.CharField(u'专利号', max_length=128, blank=True)
patent_type = models.CharField(u'专利类型', max_length=128, blank=True)
patent_time = models.CharField(u'专利时间', max_length=128)
def __unicode__(self):
return self.patent
class Meta:
verbose_name_plural=u'专利授权与申请'