o_rely.go 636 B

123456789101112131415161718192021
  1. package model
  2. import (
  3. "time"
  4. )
  5. type RelyDBModel struct {
  6. Id uint `gorm:"column:id;primary_key" json:"id"`
  7. CustomId string ` json:"custom_id"`
  8. ContainerCustomId string `json:"container_custom_id"`
  9. ContainerId string `json:"container_id,omitempty"`
  10. Type int `json:"type"` // 目前暂未使用
  11. CreatedAt time.Time `gorm:"<-:create" json:"created_at"`
  12. UpdatedAt time.Time `gorm:"<-:create;<-:update" json:"updated_at"`
  13. }
  14. /****************使gorm支持[]string结构*******************/
  15. func (p RelyDBModel) TableName() string {
  16. return "o_rely"
  17. }