package dto import pkgdto "github.com/Caknoooo/go-gin-clean-starter/pkg/dto" const ( MESSAGE_FAILED_CREATE_INVENTORY_ISSUE = "failed create inventory issue" MESSAGE_FAILED_CREATE_INVENTORY_ISSUE_LINE = "failed create inventory issue line" MESSAGE_SUCCESS_CREATE_INVENTORY_ISSUE = "success create inventory issue" MESSAGE_SUCCESS_CREATE_INVENTORY_ISSUE_LINE = "success create inventory issue line" MESSAGE_FAILED_GET_INVENTORY_ISSUE = "failed get inventory issue" MESSAGE_SUCCESS_GET_INVENTORY_ISSUE = "success get inventory issue" MESSAGE_FAILED_UPDATE_INVENTORY_ISSUE = "failed update inventory issue" MESSAGE_FAILED_UPDATE_INVENTORY_ISSUE_LINE = "failed update inventory issue line" MESSAGE_SUCCESS_UPDATE_INVENTORY_ISSUE = "success update inventory issue" MESSAGE_SUCCESS_UPDATE_INVENTORY_ISSUE_LINE = "success update inventory issue line" MESSAGE_FAILED_DELETE_INVENTORY_ISSUE = "failed delete inventory issue" MESSAGE_FAILED_DELETE_INVENTORY_ISSUE_LINE = "failed delete inventory issue line" MESSAGE_SUCCESS_DELETE_INVENTORY_ISSUE = "success delete inventory issue" MESSAGE_SUCCESS_DELETE_INVENTORY_ISSUE_LINE = "success delete inventory issue line" MESSAGE_FAILED_GET_DATA_FROM_BODY = "failed get data from body" ) type InventoryIssueCreateRequest struct { DocumentDate string `json:"document_date"` DueDate string `json:"due_date"` IssuerBy string `json:"issuer_by"` InvRequestID string `json:"inv_request_id"` ClientID string `json:"client_id" binding:"required"` Status string `json:"status" binding:"required"` IssueLines []InventoryIssueLineCreateRequest `json:"issue_lines,omitempty" binding:"dive"` } type InventoryIssueLineCreateRequest struct { CurrentStock float64 `json:"current_stock"` MinStock float64 `json:"min_stock"` RequestQuantity float64 `json:"request_quantity"` IssuedQuantity float64 `json:"issued_quantity"` Remarks string `json:"remarks"` ProductID string `json:"product_id"` WarehouseID string `json:"warehouse_id"` ClientID string `json:"client_id"` } type InventoryIssueUpdateRequest struct { DocumentDate string `json:"document_date"` DueDate string `json:"due_date"` Status string `json:"status"` } type InventoryIssueLineUpdateRequest struct { CurrentStock *float64 `json:"current_stock"` MinStock *float64 `json:"min_stock"` RequestQuantity *float64 `json:"request_quantity"` IssuedQuantity *float64 `json:"issued_quantity"` Remarks *string `json:"remarks"` ProductID *string `json:"product_id"` WarehouseID *string `json:"warehouse_id"` ClientID *string `json:"client_id"` } type InventoryIssueResponse struct { ID string `json:"id"` DocumentNumber string `json:"document_number"` DocumentDate string `json:"document_date"` DueDate string `json:"due_date"` Status string `json:"status"` IssuerBy pkgdto.IdNameResponse `json:"issuer_by"` InvRequest pkgdto.IdNameResponse `json:"inv_request"` Client pkgdto.IdNameResponse `json:"client"` LineCount int `json:"line_count"` IssueLines []InventoryIssueLineResponse `json:"issue_lines"` Assignment AssignmentResponse `json:"assignment,omitempty"` } type InventoryIssueLineResponse struct { ID string `json:"id"` CurrentStock float64 `json:"current_stock"` MinStock float64 `json:"min_stock"` RequestQuantity float64 `json:"request_quantity"` IssuedQuantity float64 `json:"issued_quantity"` Remarks string `json:"remarks"` Product InventoryIssueProductResponse `json:"product"` Warehouse pkgdto.IdNameResponse `json:"warehouse"` Client pkgdto.IdNameResponse `json:"client"` } type InventoryIssueProductResponse struct { ID string `json:"id"` RefNumber string `json:"ref_number"` Name string `json:"name"` } type AssignmentResponse struct { ID string `json:"id"` DocumentType string `json:"document_type"` DocumentID string `json:"document_id"` // Client pkgdto.IdNameResponse `json:"client"` AssignmentUsers []AssignmentUserResponse `json:"assignment_users"` } type AssignmentUserResponse struct { ID string `json:"id"` TaskType string `json:"task_type"` User pkgdto.IdNameResponse `json:"user"` Role pkgdto.IdNameResponse `json:"role"` // Client pkgdto.IdNameResponse `json:"client"` }