resource.go 517 B

123456789101112131415161718
  1. package model
  2. import "go-common/library/time"
  3. // Resource reprensents the resource table
  4. type Resource struct {
  5. ID int64 `json:"id" params:"id"`
  6. Name string `json:"name" params:"name"`
  7. Version int64 `json:"version" params:"version"`
  8. PoolID int64 `json:"pool_id" params:"pool_id"`
  9. Ctime time.Time `json:"ctime" params:"ctime"`
  10. Mtime time.Time `json:"mtime" params:"mtime"`
  11. }
  12. // TableName gives the table name of the model
  13. func (*Resource) TableName() string {
  14. return "resource"
  15. }