説明なし

models.py 1.2KB

    # -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from pai2.basemodels import CreateUpdateMixin from shortuuidfield import ShortUUIDField class LensmanInfo(CreateUpdateMixin): MALE = 0 FEMALE = 1 SEX_TYPE = ( (MALE, u'男'), (FEMALE, u'女'), ) lensman_id = ShortUUIDField(_(u'lensman_id'), max_length=255, help_text=u'摄影师唯一标识', db_index=True) name = models.CharField(_(u'name'), max_length=255, blank=True, null=True, help_text=u'摄影师姓名') sex = models.IntegerField(_(u'sex'), choices=SEX_TYPE, default=MALE, help_text=u'摄影师性别') phone = models.CharField(_(u'phone'), max_length=255, blank=True, null=True, help_text=u'摄影师电话', db_index=True, unique=True) location = models.CharField(_(u'location'), max_length=255, blank=True, null=True, help_text=u'摄影师地址') proportion = models.FloatField(_(u'proportion'), default=1.0, help_text=u'摄影师分成比例(0.0 ~ 1.0)') class Meta: verbose_name = _(u'lensmaninfo') verbose_name_plural = _(u'lensmaninfo') def __unicode__(self): return unicode(self.pk)