# coding=utf-8

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

class Notices(models.Model):

    content = models.TextField(verbose_name=u"内容")
    title = models.CharField(max_length=50, verbose_name=u'标题')
    create_time = models.DateTimeField(verbose_name='发布时间', auto_now_add=True)
    create_user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=u"创建者", on_delete=models.PROTECT,
                                    editable=False,)
    end_time = models.DateField(verbose_name='截止时间', blank=True)

    class Meta:
        db_table = "notices"
        verbose_name = u"通知"
        ordering = ['-id']
