1234567891011121314151617181920212223242526 |
- from django.db import models
- class BaseModel(models.Model):
- create_time = models.DateTimeField(auto_now_add=True,verbose_name="创建时间")
- update_time = models.DateTimeField(auto_now=True,verbose_name="修改时间")
- create_user = models.CharField(max_length=50, verbose_name='创建人')
- update_user = models.CharField(max_length=50,default='', verbose_name='修改人')
- class Meta:
- abstract = True #表示用户被继承,不会迁移生成数据库所对应的具体的表
- class UtilsModel(BaseModel):
- component = models.CharField(max_length=100, null=False, blank=False, verbose_name='使用组件')
- status = models.BooleanField(default=True, verbose_name='状态')
- fontsize = models.IntegerField(default=0, verbose_name='字体大小')
- fontclass = models.CharField(max_length=30, default='', verbose_name='字体类型')
- fontbold = models.BooleanField(default=False, verbose_name='是否加粗')
- fontcolor = models.CharField(max_length=100, default='', verbose_name='字体颜色')
- backgroundcolor = models.CharField(max_length=100, default='', verbose_name='背景颜色')
- transparency = models.CharField(max_length=100, default='', verbose_name='元素透明度')
- goby = models.CharField(max_length=100, default='', verbose_name='鼠标移动上去效果')
- topborder = models.CharField(max_length=100, default='', verbose_name='上边框和颜色')
- bottomborder = models.CharField(max_length=100, default='', verbose_name='下边框和颜色')
- leftborder = models.CharField(max_length=100, default='', verbose_name='左边框和颜色')
- rightborder = models.CharField(max_length=100, default='', verbose_name='右边框和颜色')
- rem = models.TextField(default='', null=True, blank=True, verbose_name='备注')
- class Meta:
- abstract = True #表示用户被继承,不会迁移生成数据库所对应的具体的表
|