package cache import ( "time" "gorm.io/datatypes" ) type KVModel struct { Key string `gorm:"primaryKey"` Value datatypes.JSON ExpiresAt *time.Time CreatedAt time.Time } func (KVModel) TableName() string { return "cache_kv" } type HashModel struct { Key string `gorm:"primaryKey"` Field string `gorm:"primaryKey"` Value datatypes.JSON CreatedAt time.Time ExpiresAt *time.Time } func (HashModel) TableName() string { return "cache_hash" }