| PUT | /equipment/{Id} |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class UpdateEquipmentRequest
{
var id:Int? = null
var name:String? = null
var imageUrl:String? = null
var description:String? = null
var unit:String? = null
var materialTypeId:Int? = null
}
open class Equipment
{
var id:Int? = null
@Required()
@StringLength(500)
var name:String? = null
@StringLength(1000)
var imageUrl:String? = null
var description:String? = null
@StringLength(50)
var unit:String? = null
var materialTypeId:Int? = null
var status:Int? = null
var isDeleted:Boolean? = null
var approvedAt:Date? = null
var approvedBy:Int? = null
var createdAt:Date? = null
var createdBy:Int? = null
var updatedAt:Date? = null
var updatedBy:Int? = null
@Ignore()
var materialTypeName:String? = null
@Ignore()
var createdByName:String? = null
@Ignore()
var approvedByName:String? = null
}
Kotlin UpdateEquipmentRequest 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.
PUT /equipment/{Id} HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":0,"name":"String","imageUrl":"String","description":"String","unit":"String","materialTypeId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id":0,"name":"String","imageUrl":"String","description":"String","unit":"String","materialTypeId":0,"status":0,"isDeleted":false,"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,"materialTypeName":"String","createdByName":"String","approvedByName":"String"}