Documentation ¶
Index ¶
Constants ¶
View Source
const ( SqlReportBatchAll = "" /* 140-byte string literal not displayed */ SqlReportBatchByID = "" /* 163-byte string literal not displayed */ SqlCreateBatch = "" /* 232-byte string literal not displayed */ SqlGetByBatchNum = "SELECT batch_number FROM product_batches WHERE batch_number = ?" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductBatch ¶
type ProductBatch struct { ID int `json:"id"` BatchNumber int `json:"batch_number"` CurQuantity int `json:"current_quantity"` CurTemperature int `json:"current_temperature"` DueDate string `json:"due_date"` InitialQuantity int `json:"initial_quantity"` ManufactDate string `json:"manufacturing_date"` ManufactHour int `json:"manufacturing_hour"` MinTemperature int `json:"minimum_temperature"` ProductTypeID int `json:"product_id" binding:"required"` SectionID int `json:"section_id" binding:"required"` }
type Repository ¶
type Repository interface { Create(ctx context.Context, pb ProductBatch) (ProductBatch, error) Report(ctx context.Context) ([]Report, error) ReportByID(ctx context.Context, id int) (Report, error) GetByBatchNum(ctx context.Context, bn int) (ProductBatch, error) }
func NewRepository ¶
func NewRepository(db *sql.DB) Repository
type Services ¶
type Services interface { Report(ctx context.Context) ([]Report, error) ReportByID(ctx context.Context, id int) (Report, error) Create(ctx context.Context, pb ProductBatch) (ProductBatch, error) }
func NewService ¶
func NewService(r Repository) Services
Click to show internal directories.
Click to hide internal directories.