2015-08-04 17:38:04 +08:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
from account.models import User
|
2015-09-22 17:03:53 +08:00
|
|
|
from utils.models import RichTextField
|
2015-08-04 17:38:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Announcement(models.Model):
|
|
|
|
title = models.CharField(max_length=50)
|
2016-08-02 22:02:51 +08:00
|
|
|
# HTML
|
2015-09-22 17:03:53 +08:00
|
|
|
content = RichTextField()
|
2015-08-04 17:38:04 +08:00
|
|
|
create_time = models.DateTimeField(auto_now_add=True)
|
|
|
|
created_by = models.ForeignKey(User)
|
2015-08-06 13:17:15 +08:00
|
|
|
last_update_time = models.DateTimeField(auto_now=True)
|
2015-08-04 17:38:04 +08:00
|
|
|
visible = models.BooleanField(default=True)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
db_table = "announcement"
|