Documentation ¶
Overview ¶
Package models provides ...
Index ¶
- func AddCategory(name string) error
- func AddReply(tid, nickname, content string) error
- func AddTopic(title, category, tag, content, attachment string) error
- func DecreaseCategory(tid int64) error
- func DeleteCategory(id string) error
- func DeleteReplies(tid string) error
- func DeleteReply(rid string) error
- func DeleteTopic(tid string) error
- func DeleteTopics(cid string) error
- func IncreaseCategory(tid int64) error
- func ModifyTopic(tid, title, category, tags, content, attachment string) error
- func RegisterDB()
- func UpdateTopicInfo(id string) error
- type Category
- type Comment
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCategory ¶
func DecreaseCategory ¶
func DeleteCategory ¶
func DeleteReplies ¶
func DeleteReply ¶
func DeleteTopic ¶
func DeleteTopics ¶
func IncreaseCategory ¶
func ModifyTopic ¶
func RegisterDB ¶
func RegisterDB()
func UpdateTopicInfo ¶
Types ¶
type Category ¶
type Category struct { Id int64 Title string Created time.Time `orm:"index"` Views int64 `orm:"index"` TopicTime time.Time `orm:"imdex"` TopicCount int64 TopicLastUserId int64 }
func GetAllCategories ¶
type Comment ¶
type Comment struct { Id int64 Tid int64 Name string Content string `orm:"size(1000)"` Created time.Time `orm:"index"` }
func GetAllReplies ¶
type Topic ¶
Click to show internal directories.
Click to hide internal directories.