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