This commit is contained in:
2023-06-19 02:39:18 +08:00
parent 7349f5a1d6
commit 45c1ddd87c
3 changed files with 21 additions and 5 deletions

View File

@@ -27,3 +27,13 @@ func (list *TagList) Scan(value interface{}) error {
func (list TagList) Value() (driver.Value, error) {
return json.Marshal(list)
}
type StarList []int
func (list *StarList) Scan(value interface{}) error {
return json.Unmarshal(value.([]byte), list)
}
func (list StarList) Value() (driver.Value, error) {
return json.Marshal(list)
}