Documentation
¶
Overview ¶
Package models holds GORM fixtures for the multi-DB conformance suite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
gorm.Model
Code string `gorm:"size:64;uniqueIndex;not null"`
Name string `gorm:"size:120;index;not null"`
Notes *string `gorm:"size:255"`
Price decimal.Decimal `gorm:"type:decimal(19,4);not null"`
Discount types.Decimal `gorm:"type:decimal(19,4);not null"`
}
Item exercises portable schema features required by M2-4 conformance: timestamps (via gorm.Model), nullable columns, unique + non-unique indexes, and decimal storage. Discount uses the framework types.Decimal wrapper (#222) so the shared money type is covered across the SQLite/PostgreSQL/MySQL matrix.
Click to show internal directories.
Click to hide internal directories.