package models import "strings" // NormalizeLotName returns the canonical form of a lot name: trimmed and uppercased. // Apply at every point where a lot name enters the system (sync, API input, config load). func NormalizeLotName(s string) string { return strings.ToUpper(strings.TrimSpace(s)) } // Lot represents existing lot table type Lot struct { LotName string `gorm:"column:lot_name;primaryKey;size:255" json:"lot_name"` LotDescription string `gorm:"column:lot_description;size:10000" json:"lot_description"` LotCategory *string `gorm:"column:lot_category;size:50" json:"lot_category"` } func (Lot) TableName() string { return "lot" }