# coding=utf-8

from django.db import models
from django.conf import settings


class Employee(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL, editable=False, related_name='employee', on_delete=models.PROTECT, verbose_name=u'职工')
    name = models.CharField(max_length=100, verbose_name=u"姓名")
    tel = models.CharField(max_length=50, verbose_name=u'电话')
    gender = models.PositiveSmallIntegerField(choices=settings.GENDER_CHOICES, verbose_name=u'性别')

    class Meta:
        db_table = "employee"
        verbose_name = u'职工管理'
        ordering = ['-id']
        index_together = (
            'name',
            'tel',
            'gender',
        )
        default_permissions = ()
        permissions = []

