| POST | /procurement/item |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateProcurementItemRequest
{
public Integer batchId = null;
public Integer equipmentId = null;
public String productName = null;
public String technicalSpec = null;
public String unit = null;
public Integer quantity = null;
public String purpose = null;
public String note = null;
public Integer getBatchId() { return batchId; }
public CreateProcurementItemRequest setBatchId(Integer value) { this.batchId = value; return this; }
public Integer getEquipmentId() { return equipmentId; }
public CreateProcurementItemRequest setEquipmentId(Integer value) { this.equipmentId = value; return this; }
public String getProductName() { return productName; }
public CreateProcurementItemRequest setProductName(String value) { this.productName = value; return this; }
public String getTechnicalSpec() { return technicalSpec; }
public CreateProcurementItemRequest setTechnicalSpec(String value) { this.technicalSpec = value; return this; }
public String getUnit() { return unit; }
public CreateProcurementItemRequest setUnit(String value) { this.unit = value; return this; }
public Integer getQuantity() { return quantity; }
public CreateProcurementItemRequest setQuantity(Integer value) { this.quantity = value; return this; }
public String getPurpose() { return purpose; }
public CreateProcurementItemRequest setPurpose(String value) { this.purpose = value; return this; }
public String getNote() { return note; }
public CreateProcurementItemRequest setNote(String value) { this.note = value; return this; }
}
public static class ProcurementItem
{
public Integer id = null;
public Integer batchId = null;
public Integer departmentId = null;
public Integer equipmentId = null;
@Required()
@StringLength(500)
public String productName = null;
public String technicalSpec = null;
@StringLength(50)
public String unit = null;
public Integer quantity = null;
public String purpose = null;
public String note = null;
public Integer approvalStatus = null;
public String approvalNote = null;
public Date approvedAt = null;
public Integer approvedBy = null;
public Date createdAt = null;
public Integer createdBy = null;
public Date updatedAt = null;
public Integer updatedBy = null;
public Boolean isDeleted = null;
public Date deletedAt = null;
public Integer deletedBy = null;
@Ignore()
public String departmentName = null;
@Ignore()
public String createdByName = null;
@Ignore()
public String approvedByName = null;
public Integer getId() { return id; }
public ProcurementItem setId(Integer value) { this.id = value; return this; }
public Integer getBatchId() { return batchId; }
public ProcurementItem setBatchId(Integer value) { this.batchId = value; return this; }
public Integer getDepartmentId() { return departmentId; }
public ProcurementItem setDepartmentId(Integer value) { this.departmentId = value; return this; }
public Integer getEquipmentId() { return equipmentId; }
public ProcurementItem setEquipmentId(Integer value) { this.equipmentId = value; return this; }
public String getProductName() { return productName; }
public ProcurementItem setProductName(String value) { this.productName = value; return this; }
public String getTechnicalSpec() { return technicalSpec; }
public ProcurementItem setTechnicalSpec(String value) { this.technicalSpec = value; return this; }
public String getUnit() { return unit; }
public ProcurementItem setUnit(String value) { this.unit = value; return this; }
public Integer getQuantity() { return quantity; }
public ProcurementItem setQuantity(Integer value) { this.quantity = value; return this; }
public String getPurpose() { return purpose; }
public ProcurementItem setPurpose(String value) { this.purpose = value; return this; }
public String getNote() { return note; }
public ProcurementItem setNote(String value) { this.note = value; return this; }
public Integer getApprovalStatus() { return approvalStatus; }
public ProcurementItem setApprovalStatus(Integer value) { this.approvalStatus = value; return this; }
public String getApprovalNote() { return approvalNote; }
public ProcurementItem setApprovalNote(String value) { this.approvalNote = value; return this; }
public Date getApprovedAt() { return approvedAt; }
public ProcurementItem setApprovedAt(Date value) { this.approvedAt = value; return this; }
public Integer getApprovedBy() { return approvedBy; }
public ProcurementItem setApprovedBy(Integer value) { this.approvedBy = value; return this; }
public Date getCreatedAt() { return createdAt; }
public ProcurementItem setCreatedAt(Date value) { this.createdAt = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public ProcurementItem setCreatedBy(Integer value) { this.createdBy = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public ProcurementItem setUpdatedAt(Date value) { this.updatedAt = value; return this; }
public Integer getUpdatedBy() { return updatedBy; }
public ProcurementItem setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
public Boolean getIsDeleted() { return isDeleted; }
public ProcurementItem setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
public Date getDeletedAt() { return deletedAt; }
public ProcurementItem setDeletedAt(Date value) { this.deletedAt = value; return this; }
public Integer getDeletedBy() { return deletedBy; }
public ProcurementItem setDeletedBy(Integer value) { this.deletedBy = value; return this; }
public String getDepartmentName() { return departmentName; }
public ProcurementItem setDepartmentName(String value) { this.departmentName = value; return this; }
public String getCreatedByName() { return createdByName; }
public ProcurementItem setCreatedByName(String value) { this.createdByName = value; return this; }
public String getApprovedByName() { return approvedByName; }
public ProcurementItem setApprovedByName(String value) { this.approvedByName = value; return this; }
}
}
Java CreateProcurementItemRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /procurement/item HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"batchId":0,"equipmentId":0,"productName":"String","technicalSpec":"String","unit":"String","quantity":0,"purpose":"String","note":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id":0,"batchId":0,"departmentId":0,"equipmentId":0,"productName":"String","technicalSpec":"String","unit":"String","quantity":0,"purpose":"String","note":"String","approvalStatus":0,"approvalNote":"String","approvedAt":"0001-01-01T00:00:00.0000000+07:06","approvedBy":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0,"updatedAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":0,"isDeleted":false,"deletedAt":"0001-01-01T00:00:00.0000000+07:06","deletedBy":0,"departmentName":"String","createdByName":"String","approvedByName":"String"}