| POST | /procurement/batch/{BatchId}/assignees |
|---|
import 'package:servicestack/servicestack.dart';
class ProcurementBatchAssignee implements IConvertible
{
int? id;
int? batchId;
int? userId;
DateTime? createdAt;
int? createdBy;
// @ignore()
String? userName;
// @ignore()
String? userFullName;
ProcurementBatchAssignee({this.id,this.batchId,this.userId,this.createdAt,this.createdBy,this.userName,this.userFullName});
ProcurementBatchAssignee.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
batchId = json['batchId'];
userId = json['userId'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
userName = json['userName'];
userFullName = json['userFullName'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'batchId': batchId,
'userId': userId,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy,
'userName': userName,
'userFullName': userFullName
};
getTypeName() => "ProcurementBatchAssignee";
TypeContext? context = _ctx;
}
class AddProcurementAssigneeRequest implements IConvertible
{
int? batchId;
int? userId;
AddProcurementAssigneeRequest({this.batchId,this.userId});
AddProcurementAssigneeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
batchId = json['batchId'];
userId = json['userId'];
return this;
}
Map<String, dynamic> toJson() => {
'batchId': batchId,
'userId': userId
};
getTypeName() => "AddProcurementAssigneeRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'ProcurementBatchAssignee': TypeInfo(TypeOf.Class, create:() => ProcurementBatchAssignee()),
'AddProcurementAssigneeRequest': TypeInfo(TypeOf.Class, create:() => AddProcurementAssigneeRequest()),
});
Dart AddProcurementAssigneeRequest 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/batch/{BatchId}/assignees HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"batchId":0,"userId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id":0,"batchId":0,"userId":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0,"userName":"String","userFullName":"String"}