release: v0.6.1
This commit is contained in:
commit
877eef7f07
118 files changed
+46315
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package label_model
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Label struct {
|
||||
Id string `json:"id" gorm:"type:uuid;primaryKey"`
|
||||
InstanceID string `json:"instance_id" gorm:"type:uuid"`
|
||||
LabelID string `json:"label_id"`
|
||||
LabelName string `json:"label_name"`
|
||||
LabelColor string `json:"label_color"`
|
||||
PredefinedId string `json:"predefined_id"`
|
||||
}
|
||||
|
||||
func (m *Label) BeforeCreate(tx *gorm.DB) (err error) {
|
||||
m.Id = uuid.New().String()
|
||||
return
|
||||
}
|
||||
Reference in new issue
Block a user