from django.db import models
from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
    user_name = models.CharField(max_length=20, verbose_name='用户名称',null=True)
    password  = models.CharField(max_length=20, verbose_name='密码',null=True)
    up_date = models.DateField(verbose_name='修改时间')
    class Meta:
        db_table = "mb_users"

    def __str__(self):
        return self.username

class Customer(models.Model):
    user_no = models.CharField(max_length=20, verbose_name='用户编码', null=True)
    username = models.CharField(max_length=20, verbose_name='用户名称',null=True)
    password  = models.CharField(max_length=200, verbose_name='密码',null=True)
    up_date = models.DateField(verbose_name='修改时间',null=True)
    class Meta:
        db_table = "mb_customer"

    def __str__(self):
        return self.username