Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() *Repository
func NewRepositoryCustom ¶
func NewRepositoryCustom(_db *gorm.DB) *Repository
func (*Repository) GetThing ¶
func (r *Repository) GetThing(id int) *Thing
func (*Repository) GetThingByName ¶
func (r *Repository) GetThingByName(name string) *Thing
func (*Repository) ListThings ¶
func (r *Repository) ListThings() []Thing
func (*Repository) SaveThing ¶
func (r *Repository) SaveThing(t *Thing) *Thing
type StockMovement ¶
type Thing ¶
type Thing struct { ID int `json:"id" gorm:"primaryKey;autoIncrement"` Name string `json:"name" gorm:"uniqueIndex;unique;size:50"` Description *string `json:"description" gorm:"size:255"` Available float64 `json:"available"` StockMovements []StockMovement `json:"movs"` CreatedAt time.Time UpdatedAt time.Time }
Click to show internal directories.
Click to hide internal directories.