Skip to main content

Defining models

type Product struct {
Id *int `db:"id"`
ProductName string `db:"product_name"`
Description string `db:"description"`
Price decimal.Decimal `db:"price"`
Weight float32 `db:"weight"`
IsAvailable bool `db:"is_available"`
ManufactureDate time.Time `db:"manufacture_date"`
AddedDateTime time.Time `db:"added_datetime"`
}