Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
e29aab0b9d
Add tags to model 2025-09-20 10:32:04 +02:00
2 changed files with 19 additions and 0 deletions

View file

@ -56,6 +56,8 @@ func GetDatabase() (*gorm.DB, error) {
&models.ListItem{},
&models.Field{},
&models.FieldValue{},
&models.Tag{},
&models.PersonTag{},
)
if err != nil {
return database, err

17
models/tags.go Normal file
View file

@ -0,0 +1,17 @@
package models
import "gorm.io/gorm"
type Tag struct {
gorm.Model
Name string
Color string
}
type PersonTag struct {
gorm.Model
PersonID uint
Person Person
TagID uint
Tag Tag
}