You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
1.1 KiB

from django.db import models
# Create your models here.
class UserBaseInfo(models.Model):
id = models.AutoField(verbose_name='用户id', primary_key=True)
username = models.CharField(verbose_name='用户名', max_length=30)
password = models.CharField(verbose_name='密码', max_length=20)
age = models.IntegerField(verbose_name='年龄')
mobile = models.CharField(verbose_name='手机号', max_length=20)
status = models.CharField(verbose_name='状态', max_length=1)
create_date = models.DateField(verbose_name='创建时间', auto_now_add=True)
class UserStatus(models.Model):
# id = models.AutoField(verbose_name='状态id', primary_key=True)
status = models.CharField(verbose_name='状态', max_length=10)
class ImgFile(models.Model):
name = models.CharField(verbose_name='名称', default='', max_length=30)
heading = models.FileField(verbose_name='文件', upload_to='uploads/')
def __str__(self):
return str(self.name)
class Meta:
verbose_name = '用户头像信息'
db_table = 'user_img'