19 lines
529 B
Python
Raw Normal View History

from django.db import models
from account.models import User
2015-09-22 17:03:53 +08:00
from utils.models import RichTextField
class Announcement(models.Model):
2018-05-01 12:54:27 +08:00
title = models.TextField()
2016-08-02 22:02:51 +08:00
# HTML
2015-09-22 17:03:53 +08:00
content = RichTextField()
create_time = models.DateTimeField(auto_now_add=True)
2019-03-11 11:25:10 +08:00
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
last_update_time = models.DateTimeField(auto_now=True)
visible = models.BooleanField(default=True)
class Meta:
db_table = "announcement"
2017-10-31 16:33:25 +08:00
ordering = ("-create_time",)