1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package model
- import (
- "time"
- )
- 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"`
- }
- 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 int64 `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"`
- }
- func (ud *UserDoc) TableName() string {
- return "user_doc"
- }
- type DocActivity struct {
- 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"`
- }
- func (ud *DocActivity) TableName() string {
- return "doc_activity"
- }
- type UserDocData struct {
- Id string `json:"id"`
- 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"`
- }
- func (ud *UserDocData) TableName() string {
- return "user_doc"
- }
|