| PUT | /workflow/{Id} |
|---|
import 'package:servicestack/servicestack.dart';
class Workflow implements IConvertible
{
int? id;
// @required()
// @StringLength(500)
String? title;
// @StringLength(4000)
String? description;
// @StringLength(100)
String? documentCode;
int? documentTypeId;
bool? isInstance;
int? mainId;
bool? isActive;
int? statusId;
int? accountId;
int? departmentId;
// @ignore()
int? scopeType;
// @StringLength(500)
String? createdBy;
DateTime? createdAt;
// @StringLength(500)
String? updatedBy;
DateTime? updatedAt;
Workflow({this.id,this.title,this.description,this.documentCode,this.documentTypeId,this.isInstance,this.mainId,this.isActive,this.statusId,this.accountId,this.departmentId,this.scopeType,this.createdBy,this.createdAt,this.updatedBy,this.updatedAt});
Workflow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
description = json['description'];
documentCode = json['documentCode'];
documentTypeId = json['documentTypeId'];
isInstance = json['isInstance'];
mainId = json['mainId'];
isActive = json['isActive'];
statusId = json['statusId'];
accountId = json['accountId'];
departmentId = json['departmentId'];
scopeType = json['scopeType'];
createdBy = json['createdBy'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
updatedBy = json['updatedBy'];
updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'description': description,
'documentCode': documentCode,
'documentTypeId': documentTypeId,
'isInstance': isInstance,
'mainId': mainId,
'isActive': isActive,
'statusId': statusId,
'accountId': accountId,
'departmentId': departmentId,
'scopeType': scopeType,
'createdBy': createdBy,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'updatedBy': updatedBy,
'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!)
};
getTypeName() => "Workflow";
TypeContext? context = _ctx;
}
class UpdateWorkflowRequest implements IConvertible
{
int? id;
String? title;
String? description;
String? documentCode;
int? documentTypeId;
bool? isActive;
UpdateWorkflowRequest({this.id,this.title,this.description,this.documentCode,this.documentTypeId,this.isActive});
UpdateWorkflowRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
description = json['description'];
documentCode = json['documentCode'];
documentTypeId = json['documentTypeId'];
isActive = json['isActive'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'description': description,
'documentCode': documentCode,
'documentTypeId': documentTypeId,
'isActive': isActive
};
getTypeName() => "UpdateWorkflowRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'qlcn_api.vsmlab.vn', types: <String, TypeInfo> {
'Workflow': TypeInfo(TypeOf.Class, create:() => Workflow()),
'UpdateWorkflowRequest': TypeInfo(TypeOf.Class, create:() => UpdateWorkflowRequest()),
});
Dart UpdateWorkflowRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /workflow/{Id} HTTP/1.1
Host: qlcn-api.vsmlab.vn
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":0,"title":"String","description":"String","documentCode":"String","documentTypeId":0,"isActive":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"id":0,"title":"String","description":"String","documentCode":"String","documentTypeId":0,"isInstance":false,"mainId":0,"isActive":false,"statusId":0,"accountId":0,"departmentId":0,"scopeType":2,"createdBy":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":"String","updatedAt":"0001-01-01T00:00:00.0000000+07:06"}