Files
EvoGO/pkg/label/model/label_model.go
2026-03-25 12:40:16 -03:00

21 lines
478 B
Go

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
}