1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// 自动生成模板DataMedComment
package model
import (
"time"
)
// 如果含有time.Time 请自行import time包
type ReadBook struct {
Id int `json:"id" form:"id" gorm:"column:id;comment:;type:int;size:11;"` // 主键ID
Name string `json:"name" form:"name" gorm:"column:name;comment:;type:varchar(50);"`
Author string `json:"author" form:"author" gorm:"column:author;comment:;type:varchar(24);"`
Desciption string `json:"description" form:"description" gorm:"column:description;comment:;type:varchar(255);"`
ImageUrl string `json:"imageUrl" form:"imageUrl" gorm:"column:image_url;comment:;type:varchar(255);"`
CreateTime time.Time `json:"createTime" form:"createTime" gorm:"column:create_time;comment:;type:timestamp;"`
UpdateTime time.Time `json:"updateTime" form:"updateTime" gorm:"column:update_time;comment:;type:timestamp;"`
Delflag int `json:"delflag" form:"delflag" gorm:"column:delflag;comment:;type:int;size:1;"`
}
type ReadCatalog struct {
Id int `json:"id" form:"id" gorm:"column:id;comment:;type:int;size:11;"` // 主键ID
Name string `json:"name" form:"name" gorm:"column:name;comment:;type:varchar(50);"`
ReadBooksId int `json:"readBooksId" form:"readBooksId" gorm:"column:read_books_id;comment:;type:int;size:11;"`
ParentId int `json:"parentId" form:"parentId" gorm:"column:parent_id;comment:;type:int;size:10;"`
SortOrder int `json:"sortOrder" form:"sortOrder" gorm:"column:sort_order;comment:;type:int;size:4;"`
CreateTime time.Time `json:"createTime" form:"createTime" gorm:"column:create_time;comment:;type:timestamp;"`
UpdateTime time.Time `json:"updateTime" form:"updateTime" gorm:"column:update_time;comment:;type:timestamp;"`
Delflag int `json:"delflag" form:"delflag" gorm:"column:delflag;comment:;type:int;size:1;"`
Content int `json:"content"`
}
type ReadCatalogList struct {
Id int `json:"id" form:"id" gorm:"column:id;comment:;type:int;size:11;"` // 主键ID
Name string `json:"name" form:"name" gorm:"column:name;comment:;type:varchar(50);"`
ReadBooksId int `json:"readBooksId" form:"readBooksId" gorm:"column:read_books_id;comment:;type:int;size:11;"`
ParentId int `json:"parentId" form:"parentId" gorm:"column:parent_id;comment:;type:int;size:10;"`
SortOrder int `json:"sortOrder" form:"sortOrder" gorm:"column:sort_order;comment:;type:int;size:4;"`
Content int `json:"content"`
Children []*ReadCatalogList `json:"children"`
}
type ReadContents struct {
Id int `json:"id" form:"id" gorm:"column:id;comment:;type:int;size:11;"` // 主键ID
ReadCatalogId string `json:"readCatalogId" form:"readCatalogId" gorm:"column:read_catalog_id;comment:;type:int;size:11;"`
Content string `json:"content" form:"content" gorm:"column:content;comment:;type:text;"`
CreateTime time.Time `json:"createTime" form:"createTime" gorm:"column:create_time;comment:;type:timestamp;"`
UpdateTime time.Time `json:"updateTime" form:"updateTime" gorm:"column:update_time;comment:;type:timestamp;"`
Delflag int `json:"delflag" form:"delflag" gorm:"column:delflag;comment:;type:int;size:1;"`
}
type ReadHistory struct {
Id int `json:"id" form:"id" gorm:"column:id;comment:;type:int;size:11;"` // 主键ID
UserId int `json:"userId" form:"userId" gorm:"column:user_id;comment:;type:int;size:11;"`
ReadBookId int `json:"readBookId" form:"readBookId" gorm:"column:read_book_id;comment:;type:int;size:11;"`
ReadHistoryId string `json:"readHistoryId" form:"readHistoryId" gorm:"column:read_history_id;comment:;type:varchar(255);"`
Current string `json:"current" form:"current" gorm:"column:current;comment:;type:varchar(255);"`
CreateTime time.Time `json:"createTime" form:"createTime" gorm:"column:create_time;comment:;type:timestamp;"`
UpdateTime time.Time `json:"updateTime" form:"updateTime" gorm:"column:update_time;comment:;type:timestamp;"`
}