1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package model
- import (
- "time"
- )
- type Doc struct {
- Id string `json:"id"`
- UserId string `json:"userId"`
- DocName string `json:"before"`
- DocFileType int `json:"docFileType"`
- DocFileSuffix string `json:"docFileSuffix"`
- DocFileSize int `json:"docFileSize"`
- DocPageSize int `json:"docPageSize"`
- DocTags string `json:"docTags"`
- DocClassLevelOne string `json:"docClassLevelOne"`
- DocClassLevelTwo string `json:"docClassLevelTwo"`
- UploadDate string `json:"uploadDate"`
- IsDelete int `json:"isDelete"`
- OssDocId string `json:"ossDocId"`
- OssDocUrl string `json:"ossDocUrl"`
- Md5 string `json:"md5"`
- OssPdfId string `json:"ossPdfId"`
- OssPdfUrl string `json:"ossPdfUrl"`
- OssTxtId string `json:"ossTxtId"`
- OssTxtUrl string `json:"ossTxtUrl"`
- Price int `json:"price"`
- DownOrUp int `json:"downOrUp"`
- DocSummary string `json:"docSummary"`
- CreateAt time.Time `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
- UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"`
- DeletedAt time.Time `json:"-" gorm:"column:delete_at"`
- }
- 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"`
- Id string `json:"id" gorm:"column: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"`
- 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"`
- }
- 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"
- }
|