|
@@ -5,29 +5,30 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
type Doc struct {
|
|
type Doc struct {
|
|
- Id string `json:"id" gorm:"id"`
|
|
|
|
- UserId string `json:"userId" gorm:"column:userId"`
|
|
|
|
- DocName string `json:"docName" gorm:"column:docName"`
|
|
|
|
- DocFileType int `json:"docFileType" gorm:"column:docFileType"`
|
|
|
|
- DocFileSuffix string `json:"docFileSuffix" gorm:"column:docFileSuffix"`
|
|
|
|
- DocFileSize int `json:"docFileSize" gorm:"column:docFileSize"`
|
|
|
|
- DocPageSize int `json:"docPageSize" gorm:"column:docPageSize"`
|
|
|
|
- DocTags string `json:"docTags" gorm:"column:docTags"`
|
|
|
|
- DocClassLevelOne string `json:"docClassLevelOne" gorm:"column:docClassLevelOne"`
|
|
|
|
- DocClassLevelTwo string `json:"docClassLevelTwo" gorm:"column:docClassLevelTwo"`
|
|
|
|
- UploadDate string `json:"uploadDate" gorm:"column:uploadDate"`
|
|
|
|
- IsDelete int `json:"isDelete" gorm:"column:isDelete"`
|
|
|
|
- OssDocId string `json:"ossDocId" gorm:"column:ossDocId"`
|
|
|
|
- OssDocUrl string `json:"ossDocUrl" gorm:"column:ossDocUrl"`
|
|
|
|
- Md5 string `json:"md5" gorm:"column:md5"`
|
|
|
|
- OssPdfId string `json:"ossPdfId" gorm:"column:ossPdfId"`
|
|
|
|
- OssPdfUrl string `json:"ossPdfUrl" gorm:"column:ossPdfUrl"`
|
|
|
|
- OssTxtId string `json:"ossTxtId" gorm:"column:ossTxtId"`
|
|
|
|
- OssTxtUrl string `json:"ossTxtUrl" gorm:"column:ossTxtUrl"`
|
|
|
|
- Price int `json:"price" gorm:"column:price"`
|
|
|
|
- DownOrUp int `json:"downOrUp" gorm:"column:downOrUp"`
|
|
|
|
- DocSummary string `json:"docSummary" gorm:"column:docSummary"`
|
|
|
|
|
|
+ Id string `json:"id" gorm:"id"`
|
|
|
|
+ UserId string `json:"userId" gorm:"column:userId"`
|
|
|
|
+ DocName string `json:"docName" gorm:"column:docName"`
|
|
|
|
+ DocFileType int `json:"docFileType" gorm:"column:docFileType"`
|
|
|
|
+ DocFileSuffix string `json:"docFileSuffix" gorm:"column:docFileSuffix"`
|
|
|
|
+ DocFileSize int `json:"docFileSize" gorm:"column:docFileSize"`
|
|
|
|
+ DocPageSize int `json:"docPageSize" gorm:"column:docPageSize"`
|
|
|
|
+ DocTags string `json:"docTags" gorm:"column:docTags"`
|
|
|
|
+ DocClassLevelOne string `json:"docClassLevelOne" gorm:"column:docClassLevelOne"`
|
|
|
|
+ DocClassLevelTwo string `json:"docClassLevelTwo" gorm:"column:docClassLevelTwo"`
|
|
|
|
+ UploadDate string `json:"uploadDate" gorm:"column:uploadDate"`
|
|
|
|
+ IsDelete int `json:"isDelete" gorm:"column:isDelete"`
|
|
|
|
+ OssDocId string `json:"ossDocId" gorm:"column:ossDocId"`
|
|
|
|
+ OssDocUrl string `json:"ossDocUrl" gorm:"column:ossDocUrl"`
|
|
|
|
+ Md5 string `json:"md5" gorm:"column:md5"`
|
|
|
|
+ OssPdfId string `json:"ossPdfId" gorm:"column:ossPdfId"`
|
|
|
|
+ OssPdfUrl string `json:"ossPdfUrl" gorm:"column:ossPdfUrl"`
|
|
|
|
+ OssTxtId string `json:"ossTxtId" gorm:"column:ossTxtId"`
|
|
|
|
+ OssTxtUrl string `json:"ossTxtUrl" gorm:"column:ossTxtUrl"`
|
|
|
|
+ Price int `json:"price" gorm:"column:price"`
|
|
|
|
+ DownOrUp int `json:"downOrUp" gorm:"column:downOrUp"`
|
|
|
|
+ DocSummary string `json:"docSummary" gorm:"column:docSummary"`
|
|
}
|
|
}
|
|
|
|
+
|
|
func (ud *Doc) TableName() string {
|
|
func (ud *Doc) TableName() string {
|
|
return "doc"
|
|
return "doc"
|
|
}
|
|
}
|
|
@@ -56,13 +57,14 @@ func (ud *UserDoc) TableName() string {
|
|
|
|
|
|
type DocActivity struct {
|
|
type DocActivity struct {
|
|
Id int `json:"id" gorm:"primaryKey"`
|
|
Id int `json:"id" gorm:"primaryKey"`
|
|
- DocId string `json:"docId"`
|
|
|
|
- ActivityId int `json:"activityId"`
|
|
|
|
- DocTitle string `json:"docTitle"`
|
|
|
|
- DocSummary string `json:"docSummary"`
|
|
|
|
- DocImg string `json:"docImg"`
|
|
|
|
- Price int `json:"price"`
|
|
|
|
- CostPrice int `json:"costPrice"`
|
|
|
|
|
|
+ DocId string `json:"doc_id" gorm:"column:docId"`
|
|
|
|
+ ActivityId int `json:"activity_id" gorm:"column:activityId"`
|
|
|
|
+ AppId string `json:"app_id" gorm:"column:appId"`
|
|
|
|
+ DocTitle string `json:"doc_title" gorm:"column:docTitle"`
|
|
|
|
+ DocSummary string `json:"doc_summary" gorm:"column:docSummary"`
|
|
|
|
+ DocImg string `json:"doc_img" gorm:"column:docImg"`
|
|
|
|
+ Price int `json:"price" gorm:"column:price"`
|
|
|
|
+ CostPrice int `json:"cost_price" gorm:"column:costPrice"`
|
|
}
|
|
}
|
|
|
|
|
|
func (ud *DocActivity) TableName() string {
|
|
func (ud *DocActivity) TableName() string {
|
|
@@ -79,4 +81,4 @@ type UserDocData struct {
|
|
|
|
|
|
func (ud *UserDocData) TableName() string {
|
|
func (ud *UserDocData) TableName() string {
|
|
return "user_doc"
|
|
return "user_doc"
|
|
-}
|
|
|
|
|
|
+}
|