model.go 311 B

12345678910111213141516
  1. package orm
  2. import (
  3. "sync"
  4. "time"
  5. )
  6. type (
  7. Model struct {
  8. sync.RWMutex
  9. ID int `json:"id" gorm:"primaryKey" comment:"ID"`
  10. CreatedAt time.Time `json:"created_at" comment:"创建时间"`
  11. UpdatedAt time.Time `json:"updated_at" comment:"更新时间"`
  12. _cache map[int]interface{}
  13. }
  14. )