tag.go 651 B

1234567891011121314151617
  1. package model
  2. type Tag struct {
  3. IdModel
  4. Name string `json:"name" gorm:"default:'';not null;"`
  5. UserId uint `json:"user_id" gorm:"default:0;not null;index"`
  6. Color uint `json:"color" gorm:"default:0;not null;"` //color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色, 可以转成rgba
  7. CollectionId uint `json:"collection_id" gorm:"default:0;not null;index"`
  8. Collection *AddressBookCollection `json:"collection,omitempty"`
  9. TimeModel
  10. }
  11. type TagList struct {
  12. Tags []*Tag `json:"list"`
  13. Pagination
  14. }