stdlib.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package model
  2. type UserMoneyRecord struct {
  3. Id string `json:"id"`
  4. UserId string `json:"userId"`
  5. DocName string `json:"before"`
  6. DocFileType int `json:"docFileType"`
  7. DocFileSuffix string `json:"docFileSuffix"`
  8. DocFileSize int `json:"docFileSize"`
  9. DocPageSize int `json:"docPageSize"`
  10. DocTags string `json:"docTags"`
  11. DocClassLevelOne string `json:"docClassLevelOne"`
  12. DocClassLevelTwo string `json:"docClassLevelTwo"`
  13. UploadDate string `json:"uploadDate"`
  14. IsDelete int `json:"isDelete"`
  15. OssDocId string `json:"ossDocId"`
  16. OssDocUrl string `json:"ossDocUrl"`
  17. Md5 string `json:"md5"`
  18. OssPdfId string `json:"ossPdfId"`
  19. OssPdfUrl string `json:"ossPdfUrl"`
  20. OssTxtId string `json:"ossTxtId"`
  21. OssTxtUrl string `json:"ossTxtUrl"`
  22. Price int `json:"price"`
  23. DownOrUp int `json:"downOrUp"`
  24. DocSummary string `json:"docSummary"`
  25. }
  26. func (ud *UserMoneyRecord) TableName() string {
  27. return "doc"
  28. }
  29. type UserDoc struct {
  30. BaseModel
  31. UserId string `json:"user_id" gorm:"column:userId"`
  32. DocId string `json:"doc_id" gorm:"column:docId"`
  33. DocCategory int `json:"doc_category" gorm:"column:docCategory"`
  34. IsDelete int `json:"is_delete" gorm:"column:isDelete"`
  35. DocName string `json:"doc_name" gorm:"column:docName"`
  36. DocFileType int `json:"doc_file_type" gorm:"column:docFileType"`
  37. DocFileSuffix string `json:"doc_file_suffix" gorm:"column:docFileSuffix"`
  38. DocFileSize int `json:"doc_file_size" gorm:"column:docFileSize"`
  39. DocPageSize int `json:"doc_page_size" gorm:"column:docPageSize"`
  40. DocSummary string `json:"doc_summary" gorm:"column:docSummary"`
  41. DocSourceUserId string `json:"doc_source_user_id" gorm:"column:docSourceUserId"`
  42. }
  43. func (ud *UserDoc) TableName() string {
  44. return "user_doc"
  45. }
  46. type DocActivity struct {
  47. Id int `json:"id" gorm:"primaryKey"`
  48. DocId string `json:"docId"`
  49. ActivityId int `json:"activityId"`
  50. DocTitle string `json:"docTitle"`
  51. DocSummary string `json:"docSummary"`
  52. DocImg string `json:"docImg"`
  53. Price int `json:"price"`
  54. CostPrice int `json:"costPrice"`
  55. }
  56. func (ud *DocActivity) TableName() string {
  57. return "doc_activity"
  58. }