user_resource.go 642 B

12345678910111213141516171819202122
  1. package model
  2. import "time"
  3. // UserResource def
  4. type UserResource struct {
  5. ID int32 `json:"id" gorm:"id"`
  6. ResType int32 `json:"res_type" form:"res_type"`
  7. CustomID int32 `json:"custom_id" form:"custom_id"`
  8. Title string `json:"title" form:"title"`
  9. URL string `json:"url" form:"url"`
  10. Weight int32 `json:"weight" form:"weight"`
  11. Status int32 `json:"status" form:"status"`
  12. Creator string `json:"creator" form:"creator"`
  13. Ctime time.Time `json:"ctime"`
  14. Mtime time.Time `json:"mtime"`
  15. }
  16. // TableName user_resource
  17. func (c UserResource) TableName() string {
  18. return "user_resource"
  19. }