123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- package model
- import (
- "time"
- )
- type Doc struct {
- Id string `json:"id" gorm:"id"`
- UserId string `json:"userId" gorm:"column:userId"`
- AppId string `json:"appId" gorm:"column:appId"`
- 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"`
- DocClass string `json:"docClass" gorm:"column:docClass"`
- UploadDate time.Time `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"`
- PreviewImgId string `json:"preview_img_id" gorm:"column:previewImgId"`
- PreviewImgUrl string `json:"preview_img_url" gorm:"column:previewImgUrl"`
- }
- func (ud *Doc) TableName() string {
- return "doc"
- }
- type UserDoc struct {
- ID int `json:"id" form:"id" gorm:"primaryKey"`
- CreateAt time.Time `json:"create_at" gorm:"create_at"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
- UpdateAt time.Time `json:"update_at" gorm:"update_at"`
- DeletedAt time.Time `json:"delete_at" gorm:"column:delete_at"`
- AppId string `json:"app_id" gorm:"column:appId"`
- UserId string `json:"user_id" gorm:"column:userId"`
- DocId string `json:"doc_id" gorm:"column:docId"`
- DocCategory int `json:"doc_category" gorm:"column:docCategory"`
- IsDelete int `json:"is_delete" gorm:"column:isDelete"`
- DocName string `json:"doc_name" gorm:"column:docName"`
- DocFileType int `json:"doc_file_type" gorm:"column:docFileType"`
- DocFileSuffix string `json:"doc_file_suffix" gorm:"column:docFileSuffix"`
- DocFileSize int `json:"doc_file_size" gorm:"column:docFileSize"`
- DocPageSize int `json:"doc_page_size" gorm:"column:docPageSize"`
- DocSummary string `json:"doc_summary" gorm:"column:docSummary"`
- DocSourceUserId string `json:"doc_source_user_id" gorm:"column:docSourceUserId"`
- IsDownload int `json:"is_download" gorm:"column:isDownload"`
- IsCollection int `json:"is_collection" gorm:"column:isCollection"`
- PreviewImgId string `json:"preview_img_id" gorm:"column:previewImgId"`
- PreviewImgUrl string `json:"preview_img_url" gorm:"column:previewImgUrl"`
- Cost string `json:"cost" gorm:"column:cost"`
- }
- func (ud *UserDoc) TableName() string {
- return "user_doc"
- }
- type DocActivity struct {
- Id int `json:"id" gorm:"primaryKey"`
- 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"`
- DocFileSize int `json:"doc_file_size" gorm:"column:docFileSize"`
- DocPageSize int `json:"doc_page_size" gorm:"column:docPageSize"`
- DocFileType int `json:"docFileType" gorm:"column:docFileType"`
- UploadDate time.Time `json:"uploadDate" gorm:"column:uploadDate"`
- }
- func (ud *DocActivity) TableName() string {
- return "doc_activity"
- }
- type UserDocData struct {
- Id int `json:"id" gorm:"primaryKey"`
- UserId string `json:"user_id" gorm:"column:userId"`
- DocId string `json:"doc_id" gorm:"column:docId"`
- IsCollection int `json:"is_collection" gorm:"column:isCollection"`
- IsDelete int `json:"is_delete" gorm:"column:isDelete"`
- IsDownload int `json:"is_download" gorm:"column:isDownload"`
- }
- func (ud *UserDocData) TableName() string {
- return "user_doc"
- }
- type DocStatistics struct {
- Id int `json:"id"`
- AppId string `json:"app_id" gorm:"column:appId"`
- DocId string `json:"doc_id" gorm:"column:docId"`
- UpdateDate time.Time `json:"update_date" gorm:"column:updateDate"`
- score int `json:"score" gorm:"column:score"`
- DownTimes int `json:"down_times" gorm:"column:downTimes"`
- ViewTimes int `json:"view_times" gorm:"column:viewTimes"`
- }
- func (ud *DocStatistics) TableName() string {
- return "doc_statistics"
- }
- type InterfaceLog struct {
- InterName string `json:"interName" gorm:"column:interName"`
- CalleeId string `json:"calleeId" gorm:"column:calleeId"`
- AppId string `json:"appId" gorm:"column:appId"`
- InParameter string `json:"inParameter" gorm:"column:inParameter"`
- ReturnInfo string `json:"returnInfo" gorm:"column:returnInfo"`
- Node string `json:"node" gorm:"column:node"`
- Summary string `json:"summary" gorm:"column:summary"`
- Timestamp time.Time `json:"timestamp" gorm:"column:timestamp"`
- }
- func (ud *InterfaceLog) TableName() string {
- return "interface_log"
- }
|