Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type About ¶
type About struct { Id int32 `orm:"pk;auto"` Title string Body string `orm:"type(text)"` Time time.Time `orm:"auto_now_add;type(datetime)"` Photo string Music string BlogName string }
关于
type Album ¶
type Album struct { Id int32 `orm:"pk;auto"` Title string Content string `orm:"type(text)"` PhotoPath string Time time.Time `orm:"auto_now_add;type(datetime)"` }
相册表
type Article ¶
type Article struct { Id int32 `json:"id"orm:"pk;auto"` Title string `json:"title"` Body string `json:"body"orm:"type(text)"` Time time.Time `json:"time"orm:"auto_now_add;type(datetime)"` Cover string `json:"cover"` Key string `json:"key"` Author string `json:"author"` Category *Category `json:"category"orm:"rel(fk)"` Readers *Reader `json:"readers"orm:"rel(one)"` Comments []*Comment `json:"comments"orm:"reverse(many);on_delete(cascade)"` }
文章表
type Category ¶
type Category struct { Id int32 `json:"id" orm:"pk;auto"` Name string `json:"name" orm:"unique"` Articles []*Article `orm:"reverse(many)"` }
文章类别
type Comment ¶
type Comment struct { Id int32 `orm:"pk;auto"` Name string Content string `orm:"type(text)"` Email string Time time.Time `orm:"auto_now_add;type(datetime)"` Articles *Article `orm:"rel(fk)"` }
评论表
type File ¶
type File struct { Id int32 `orm:"pk;auto"` Name string Time time.Time `orm:"auto_now_add;type(datetime)"` Path string }
文件表
type FriendshipLink ¶
友情链接
type Reader ¶
type Reader struct { Id int32 `json:"id" orm:"pk;auto"` Number int `json:"number" ` Appreciate int `json:"appreciate" ` Articles *Article `json:"articles" orm:"reverse(one)"` }
阅读表
Click to show internal directories.
Click to hide internal directories.