2025-08-09 18:58:22 +07:00

18 lines
475 B
Go

package entities
import (
"time"
"github.com/google/uuid"
)
type Label struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
Name string `gorm:"not null;size:255" json:"name"`
Color *string `gorm:"size:16" json:"color,omitempty"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
}
func (Label) TableName() string { return "labels" }