diff --git a/pkg/model/tag.go b/pkg/model/tag.go new file mode 100644 index 0000000..d79c073 --- /dev/null +++ b/pkg/model/tag.go @@ -0,0 +1,23 @@ +package model + +import "next-terminal/pkg/global" + +type Tag struct { + Tag string `json:"tag"` +} + +func (r *Tag) TableName() string { + return "tags" +} + +func FindAllTag() (o []Property) { + if global.DB.Find(&o).Error != nil { + return nil + } + return +} + +func CreateNewTag(o *Tag) (err error) { + err = global.DB.Create(o).Error + return +}