| PUT | /procurement/item/{Id} |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using tvpl.api.ServiceModel;
using tvpl.data.Models;
namespace tvpl.api.ServiceModel
{
public partial class UpdateProcurementItemRequest
{
public virtual int Id { get; set; }
public virtual int? EquipmentId { get; set; }
public virtual string ProductName { get; set; }
public virtual string TechnicalSpec { get; set; }
public virtual string Unit { get; set; }
public virtual int Quantity { get; set; }
public virtual string Purpose { get; set; }
public virtual string Note { get; set; }
}
}
namespace tvpl.data.Models
{
public partial class ProcurementItem
{
public virtual int Id { get; set; }
public virtual int BatchId { get; set; }
public virtual int? DepartmentId { get; set; }
public virtual int? EquipmentId { get; set; }
[Required]
[StringLength(500)]
public virtual string ProductName { get; set; }
public virtual string TechnicalSpec { get; set; }
[StringLength(50)]
public virtual string Unit { get; set; }
public virtual int Quantity { get; set; }
public virtual string Purpose { get; set; }
public virtual string Note { get; set; }
public virtual int ApprovalStatus { get; set; }
public virtual string ApprovalNote { get; set; }
public virtual DateTime? ApprovedAt { get; set; }
public virtual int? ApprovedBy { get; set; }
public virtual DateTime? CreatedAt { get; set; }
public virtual int? CreatedBy { get; set; }
public virtual DateTime? UpdatedAt { get; set; }
public virtual int? UpdatedBy { get; set; }
public virtual bool? IsDeleted { get; set; }
public virtual DateTime? DeletedAt { get; set; }
public virtual int? DeletedBy { get; set; }
[Ignore]
public virtual string DepartmentName { get; set; }
[Ignore]
public virtual string CreatedByName { get; set; }
[Ignore]
public virtual string ApprovedByName { get; set; }
}
}
C# UpdateProcurementItemRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /procurement/item/{Id} HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
equipmentId: 0,
productName: String,
technicalSpec: String,
unit: String,
quantity: 0,
purpose: String,
note: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}