from django.db import models from django.db.models.base import Model import django.utils.timezone as timezone from django.db.models.query import QuerySet from apps.system.models import CommonAModel, CommonBModel, Organization, User, Dict, File from utils.model import SoftModel, BaseModel from simple_history.models import HistoricalRecords class Vendor(CommonAModel): """ 供应商信息 """ name = models.CharField('供应商名称', max_length=50, unique=True) contact = models.CharField('联系人', max_length=20) contact_phone = models.CharField('联系电话', max_length=11, unique=True) address = models.CharField('地址', max_length=200, null=True, blank=True) description = models.CharField('描述', max_length=200, blank=True, null=True) class Meta: verbose_name = '供应商信息' verbose_name_plural = verbose_name def __str__(self): return self.name