|
@@ -36,53 +36,53 @@ var once = sync.Once{}
|
|
type Book struct {
|
|
type Book struct {
|
|
BookId int `orm:"pk;auto;unique;column(book_id)" json:"book_id"`
|
|
BookId int `orm:"pk;auto;unique;column(book_id)" json:"book_id"`
|
|
// BookName 项目名称.
|
|
// BookName 项目名称.
|
|
- BookName string `orm:"column(book_name);size(500)" json:"book_name"`
|
|
|
|
|
|
+ BookName string `orm:"column(book_name);size(500);description(名称)" json:"book_name"`
|
|
//所属项目空间
|
|
//所属项目空间
|
|
- ItemId int `orm:"column(item_id);type(int);default(1)" json:"item_id"`
|
|
|
|
|
|
+ ItemId int `orm:"column(item_id);type(int);default(1);description(所属项目空间id)" json:"item_id"`
|
|
// Identify 项目唯一标识.
|
|
// Identify 项目唯一标识.
|
|
- Identify string `orm:"column(identify);size(100);unique" json:"identify"`
|
|
|
|
|
|
+ Identify string `orm:"column(identify);size(100);unique;description(唯一标识)" json:"identify"`
|
|
//是否是自动发布 0 否/1 是
|
|
//是否是自动发布 0 否/1 是
|
|
- AutoRelease int `orm:"column(auto_release);type(int);default(0)" json:"auto_release"`
|
|
|
|
|
|
+ AutoRelease int `orm:"column(auto_release);type(int);default(0);description(是否是自动发布 0 否/1 是)" json:"auto_release"`
|
|
//是否开启下载功能 0 是/1 否
|
|
//是否开启下载功能 0 是/1 否
|
|
- IsDownload int `orm:"column(is_download);type(int);default(0)" json:"is_download"`
|
|
|
|
- OrderIndex int `orm:"column(order_index);type(int);default(0)" json:"order_index"`
|
|
|
|
|
|
+ IsDownload int `orm:"column(is_download);type(int);default(0);description(是否开启下载功能 0 是/1 否)" json:"is_download"`
|
|
|
|
+ OrderIndex int `orm:"column(order_index);type(int);default(0);description(排序)" json:"order_index"`
|
|
// Description 项目描述.
|
|
// Description 项目描述.
|
|
- Description string `orm:"column(description);size(2000)" json:"description"`
|
|
|
|
|
|
+ Description string `orm:"column(description);size(2000);description(项目描述)" json:"description"`
|
|
//发行公司
|
|
//发行公司
|
|
- Publisher string `orm:"column(publisher);size(500)" json:"publisher"`
|
|
|
|
- Label string `orm:"column(label);size(500)" json:"label"`
|
|
|
|
|
|
+ Publisher string `orm:"column(publisher);size(500);description(发行公司)" json:"publisher"`
|
|
|
|
+ Label string `orm:"column(label);size(500);description(所属标签)" json:"label"`
|
|
// PrivatelyOwned 项目私有: 0 公开/ 1 私有
|
|
// PrivatelyOwned 项目私有: 0 公开/ 1 私有
|
|
- PrivatelyOwned int `orm:"column(privately_owned);type(int);default(0)" json:"privately_owned"`
|
|
|
|
|
|
+ PrivatelyOwned int `orm:"column(privately_owned);type(int);default(0);description(项目私有: 0 公开/ 1 私有)" json:"privately_owned"`
|
|
// 当项目是私有时的访问Token.
|
|
// 当项目是私有时的访问Token.
|
|
- PrivateToken string `orm:"column(private_token);size(500);null" json:"private_token"`
|
|
|
|
|
|
+ PrivateToken string `orm:"column(private_token);size(500);null;description(当项目是私有时的访问Token)" json:"private_token"`
|
|
//访问密码.
|
|
//访问密码.
|
|
- BookPassword string `orm:"column(book_password);size(500);null" json:"book_password"`
|
|
|
|
|
|
+ BookPassword string `orm:"column(book_password);size(500);null;description(访问密码)" json:"book_password"`
|
|
//状态:0 正常/1 已删除
|
|
//状态:0 正常/1 已删除
|
|
- Status int `orm:"column(status);type(int);default(0)" json:"status"`
|
|
|
|
|
|
+ Status int `orm:"column(status);type(int);default(0);description(状态:0 正常/1 已删除)" json:"status"`
|
|
//默认的编辑器.
|
|
//默认的编辑器.
|
|
- Editor string `orm:"column(editor);size(50)" json:"editor"`
|
|
|
|
|
|
+ Editor string `orm:"column(editor);size(50);description(默认的编辑器 markdown/html)" json:"editor"`
|
|
// DocCount 包含文档数量.
|
|
// DocCount 包含文档数量.
|
|
- DocCount int `orm:"column(doc_count);type(int)" json:"doc_count"`
|
|
|
|
|
|
+ DocCount int `orm:"column(doc_count);type(int);description(包含文档数量)" json:"doc_count"`
|
|
// CommentStatus 评论设置的状态:open 为允许所有人评论,closed 为不允许评论, group_only 仅允许参与者评论 ,registered_only 仅允许注册者评论.
|
|
// CommentStatus 评论设置的状态:open 为允许所有人评论,closed 为不允许评论, group_only 仅允许参与者评论 ,registered_only 仅允许注册者评论.
|
|
- CommentStatus string `orm:"column(comment_status);size(20);default(open)" json:"comment_status"`
|
|
|
|
- CommentCount int `orm:"column(comment_count);type(int)" json:"comment_count"`
|
|
|
|
|
|
+ CommentStatus string `orm:"column(comment_status);size(20);default(open);description(评论设置的状态:open 为允许所有人评论,closed 为不允许评论, group_only 仅允许参与者评论 ,registered_only 仅允许注册者评论.)" json:"comment_status"`
|
|
|
|
+ CommentCount int `orm:"column(comment_count);type(int);description(评论数量)" json:"comment_count"`
|
|
//封面地址
|
|
//封面地址
|
|
- Cover string `orm:"column(cover);size(1000)" json:"cover"`
|
|
|
|
|
|
+ Cover string `orm:"column(cover);size(1000);description(封面地址)" json:"cover"`
|
|
//主题风格
|
|
//主题风格
|
|
- Theme string `orm:"column(theme);size(255);default(default)" json:"theme"`
|
|
|
|
|
|
+ Theme string `orm:"column(theme);size(255);default(default);description(主题风格)" json:"theme"`
|
|
// CreateTime 创建时间 .
|
|
// CreateTime 创建时间 .
|
|
- CreateTime time.Time `orm:"type(datetime);column(create_time);auto_now_add" json:"create_time"`
|
|
|
|
|
|
+ CreateTime time.Time `orm:"type(datetime);column(create_time);auto_now_add;description(创建时间)" json:"create_time"`
|
|
//每个文档保存的历史记录数量,0 为不限制
|
|
//每个文档保存的历史记录数量,0 为不限制
|
|
- HistoryCount int `orm:"column(history_count);type(int);default(0)" json:"history_count"`
|
|
|
|
|
|
+ HistoryCount int `orm:"column(history_count);type(int);default(0);description(每个文档保存的历史记录数量,0 为不限制)" json:"history_count"`
|
|
//是否启用分享,0启用/1不启用
|
|
//是否启用分享,0启用/1不启用
|
|
- IsEnableShare int `orm:"column(is_enable_share);type(int);default(0)" json:"is_enable_share"`
|
|
|
|
- MemberId int `orm:"column(member_id);size(100)" json:"member_id"`
|
|
|
|
- ModifyTime time.Time `orm:"type(datetime);column(modify_time);null;auto_now" json:"modify_time"`
|
|
|
|
- Version int64 `orm:"type(bigint);column(version)" json:"version"`
|
|
|
|
|
|
+ IsEnableShare int `orm:"column(is_enable_share);type(int);default(0);description(是否启用分享,0启用/1不启用)" json:"is_enable_share"`
|
|
|
|
+ MemberId int `orm:"column(member_id);size(100);description(作者id)" json:"member_id"`
|
|
|
|
+ ModifyTime time.Time `orm:"type(datetime);column(modify_time);null;auto_now;description(修改时间)" json:"modify_time"`
|
|
|
|
+ Version int64 `orm:"type(bigint);column(version);description(版本)" json:"version"`
|
|
//是否使用第一篇文章项目为默认首页,0 否/1 是
|
|
//是否使用第一篇文章项目为默认首页,0 否/1 是
|
|
- IsUseFirstDocument int `orm:"column(is_use_first_document);type(int);default(0)" json:"is_use_first_document"`
|
|
|
|
|
|
+ IsUseFirstDocument int `orm:"column(is_use_first_document);type(int);default(0);description(是否使用第一篇文章项目为默认首页,0 否/1 是)" json:"is_use_first_document"`
|
|
//是否开启自动保存:0 否/1 是
|
|
//是否开启自动保存:0 否/1 是
|
|
- AutoSave int `orm:"column(auto_save);type(tinyint);default(0)" json:"auto_save"`
|
|
|
|
|
|
+ AutoSave int `orm:"column(auto_save);type(tinyint);default(0);description(是否开启自动保存:0 否/1 是)" json:"auto_save"`
|
|
}
|
|
}
|
|
|
|
|
|
func (book *Book) String() string {
|
|
func (book *Book) String() string {
|