This commit is contained in:
CFOU
2026-09-14 20:50:19 +02:00
commit 3091fb4020
135 changed files with 10262 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// Package units lets the admin define their own measurement units
// (kg, g, piece, carton, ...) instead of the code hard-coding a fixed list.
package units
import (
"time"
"github.com/google/uuid"
)
type Unit struct {
ID uuid.UUID `gorm:"type:uuid;primaryKey"`
Name string `gorm:"not null"`
Symbol string `gorm:"uniqueIndex;not null"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (Unit) TableName() string { return "units" }