property.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package model
  2. type PropertyImage struct {
  3. ID int `json:"id" gorm:"not null;"`
  4. Name string `json:"name" gorm:"not null;"`
  5. LocalPath string `json:"local_path" gorm:"not null;"`
  6. Gid string `json:"gid" gorm:"not null; column:gid;"`
  7. Pid string `json:"pid" gorm:"not null; column:pid;"`
  8. WxId string `json:"wx_id" gorm:"not null; column:wx_id;"`
  9. ImageWidth int `json:"image_width"`
  10. ImageHeight int `json:"image_height"`
  11. ImageFileSize int `json:"image_file_size"`
  12. ImageType string `json:"image_type"`
  13. ImageSignature string `json:"image_signature"`
  14. IsImg9 int `json:"isImg9" gorm:"not null; column:is_img9;"`
  15. Resolution string `json:"resolution" gorm:"not null; column:resolution;"`
  16. CreatedAt XTime `json:"createdAt" gorm:"column:createdAt;"`
  17. UpdatedAt XTime `json:"updatedAt" gorm:"column:updatedAt;"`
  18. }
  19. type PropertyTag struct {
  20. ID int `json:"id" gorm:"not null;"`
  21. Name string `json:"name" gorm:"not null;"`
  22. CreatedAt XTime `json:"createdAt" gorm:"column:createdAt;"`
  23. }
  24. func (*PropertyTag) TableName() string {
  25. return "property_tag"
  26. }
  27. type PropertyImageTag struct {
  28. ImageId int `json:"image_id" gorm:"not null;"`
  29. TagId int `json:"tag_id" gorm:"not null;"`
  30. }
  31. type PropertyVideo struct {
  32. ID int `json:"id" gorm:"not null;"`
  33. Name string `json:"name" gorm:"not null;"`
  34. Gid string `json:"gid" gorm:"not null; column:gid;"`
  35. Pid string `json:"pid" gorm:"not null; column:pid;"`
  36. WxId int `json:"wx_id" gorm:"not null; column:wx_id;"`
  37. VideoSignature string `json:"video_signature" gorm:"not null; column:video_signature;"`
  38. LocalPath string `json:"local_path" gorm:"not null;"`
  39. HeadImgPath string `json:"head_img_path" gorm:"not null;"`
  40. VideoType int `json:"video_type" gorm:"not null; column:video_type;"`
  41. Resolution string `json:"resolution" gorm:"not null; column:resolution;"`
  42. CreatedAt XTime `json:"createdAt" gorm:"column:createdAt;"`
  43. UpdatedAt XTime `json:"updatedAt" gorm:"column:updatedAt;"`
  44. }
  45. type PropertyVideoTag struct {
  46. VideoId int `json:"video_id" gorm:"not null;"`
  47. TagId int `json:"tag_id" gorm:"not null;"`
  48. }