| GET | /document-template/search |
|---|
import 'package:servicestack/servicestack.dart';
class PagingRequest implements IConvertible
{
int? page;
int? limit;
PagingRequest({this.page,this.limit});
PagingRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
page = json['page'];
limit = json['limit'];
return this;
}
Map<String, dynamic> toJson() => {
'page': page,
'limit': limit
};
getTypeName() => "PagingRequest";
TypeContext? context = _ctx;
}
class BasicDocument implements IConvertible
{
// @required()
String? title;
// @StringLength(4000)
String? description;
// @StringLength(500)
String? owner;
int? documentPolicyId;
int? updateDocumentId;
DateTime? effectBeginDate;
DateTime? effectEndDate;
int? issuingAgencyId;
int? documentTypeId;
int? documentGroupId;
int? subjectId;
// @StringLength(500)
String? signBy;
DateTime? signDate;
int? statusId;
bool? isInternal;
String? documentNumber;
String? documentCode;
bool? isUrgent;
int? scopeType;
bool? isActive;
BasicDocument({this.title,this.description,this.owner,this.documentPolicyId,this.updateDocumentId,this.effectBeginDate,this.effectEndDate,this.issuingAgencyId,this.documentTypeId,this.documentGroupId,this.subjectId,this.signBy,this.signDate,this.statusId,this.isInternal,this.documentNumber,this.documentCode,this.isUrgent,this.scopeType,this.isActive});
BasicDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
description = json['description'];
owner = json['owner'];
documentPolicyId = json['documentPolicyId'];
updateDocumentId = json['updateDocumentId'];
effectBeginDate = JsonConverters.fromJson(json['effectBeginDate'],'DateTime',context!);
effectEndDate = JsonConverters.fromJson(json['effectEndDate'],'DateTime',context!);
issuingAgencyId = json['issuingAgencyId'];
documentTypeId = json['documentTypeId'];
documentGroupId = json['documentGroupId'];
subjectId = json['subjectId'];
signBy = json['signBy'];
signDate = JsonConverters.fromJson(json['signDate'],'DateTime',context!);
statusId = json['statusId'];
isInternal = json['isInternal'];
documentNumber = json['documentNumber'];
documentCode = json['documentCode'];
isUrgent = json['isUrgent'];
scopeType = json['scopeType'];
isActive = json['isActive'];
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'description': description,
'owner': owner,
'documentPolicyId': documentPolicyId,
'updateDocumentId': updateDocumentId,
'effectBeginDate': JsonConverters.toJson(effectBeginDate,'DateTime',context!),
'effectEndDate': JsonConverters.toJson(effectEndDate,'DateTime',context!),
'issuingAgencyId': issuingAgencyId,
'documentTypeId': documentTypeId,
'documentGroupId': documentGroupId,
'subjectId': subjectId,
'signBy': signBy,
'signDate': JsonConverters.toJson(signDate,'DateTime',context!),
'statusId': statusId,
'isInternal': isInternal,
'documentNumber': documentNumber,
'documentCode': documentCode,
'isUrgent': isUrgent,
'scopeType': scopeType,
'isActive': isActive
};
getTypeName() => "BasicDocument";
TypeContext? context = _ctx;
}
class Document extends BasicDocument implements IConvertible
{
int? id;
// @StringLength(500)
String? reasonReturn;
int? accountId;
DateTime? deletedAt;
// @StringLength(500)
String? deletedBy;
// @StringLength(500)
String? updatedBy;
DateTime? createdAt;
// @StringLength(500)
String? createdBy;
bool? isParty;
bool? isRevisionRequested;
DateTime? lastUpdatedAt;
bool? isPrivate;
int? departmentId;
DateTime? publicationDate;
int? processStatusId;
String? fullTextSearchContent;
Document({this.id,this.reasonReturn,this.accountId,this.deletedAt,this.deletedBy,this.updatedBy,this.createdAt,this.createdBy,this.isParty,this.isRevisionRequested,this.lastUpdatedAt,this.isPrivate,this.departmentId,this.publicationDate,this.processStatusId,this.fullTextSearchContent});
Document.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
id = json['id'];
reasonReturn = json['reasonReturn'];
accountId = json['accountId'];
deletedAt = JsonConverters.fromJson(json['deletedAt'],'DateTime',context!);
deletedBy = json['deletedBy'];
updatedBy = json['updatedBy'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
isParty = json['isParty'];
isRevisionRequested = json['isRevisionRequested'];
lastUpdatedAt = JsonConverters.fromJson(json['lastUpdatedAt'],'DateTime',context!);
isPrivate = json['isPrivate'];
departmentId = json['departmentId'];
publicationDate = JsonConverters.fromJson(json['publicationDate'],'DateTime',context!);
processStatusId = json['processStatusId'];
fullTextSearchContent = json['fullTextSearchContent'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'id': id,
'reasonReturn': reasonReturn,
'accountId': accountId,
'deletedAt': JsonConverters.toJson(deletedAt,'DateTime',context!),
'deletedBy': deletedBy,
'updatedBy': updatedBy,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy,
'isParty': isParty,
'isRevisionRequested': isRevisionRequested,
'lastUpdatedAt': JsonConverters.toJson(lastUpdatedAt,'DateTime',context!),
'isPrivate': isPrivate,
'departmentId': departmentId,
'publicationDate': JsonConverters.toJson(publicationDate,'DateTime',context!),
'processStatusId': processStatusId,
'fullTextSearchContent': fullTextSearchContent
});
getTypeName() => "Document";
TypeContext? context = _ctx;
}
class DocumentTemplate implements IConvertible
{
int? id;
// @required()
String? title;
String? description;
bool? isActive;
// @ignore()
List<int>? documentIds;
// @ignore()
List<Document>? documents;
DocumentTemplate({this.id,this.title,this.description,this.isActive,this.documentIds,this.documents});
DocumentTemplate.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
description = json['description'];
isActive = json['isActive'];
documentIds = JsonConverters.fromJson(json['documentIds'],'List<int>',context!);
documents = JsonConverters.fromJson(json['documents'],'List<Document>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'description': description,
'isActive': isActive,
'documentIds': JsonConverters.toJson(documentIds,'List<int>',context!),
'documents': JsonConverters.toJson(documents,'List<Document>',context!)
};
getTypeName() => "DocumentTemplate";
TypeContext? context = _ctx;
}
class SearchDocumentTemplateResponse implements IResponseRequest, IConvertible
{
int? code;
String? message;
List<DocumentTemplate>? data;
int? totalCount;
SearchDocumentTemplateResponse({this.code,this.message,this.data,this.totalCount});
SearchDocumentTemplateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
data = JsonConverters.fromJson(json['data'],'List<DocumentTemplate>',context!);
totalCount = json['totalCount'];
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'data': JsonConverters.toJson(data,'List<DocumentTemplate>',context!),
'totalCount': totalCount
};
getTypeName() => "SearchDocumentTemplateResponse";
TypeContext? context = _ctx;
}
class SearchTemplateRequest extends PagingRequest implements IConvertible
{
String? title;
SearchTemplateRequest({this.title});
SearchTemplateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
title = json['title'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'title': title
});
getTypeName() => "SearchTemplateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()),
'BasicDocument': TypeInfo(TypeOf.Class, create:() => BasicDocument()),
'Document': TypeInfo(TypeOf.Class, create:() => Document()),
'DocumentTemplate': TypeInfo(TypeOf.Class, create:() => DocumentTemplate()),
'List<Document>': TypeInfo(TypeOf.Class, create:() => <Document>[]),
'SearchDocumentTemplateResponse': TypeInfo(TypeOf.Class, create:() => SearchDocumentTemplateResponse()),
'List<DocumentTemplate>': TypeInfo(TypeOf.Class, create:() => <DocumentTemplate>[]),
'SearchTemplateRequest': TypeInfo(TypeOf.Class, create:() => SearchTemplateRequest()),
});
Dart SearchTemplateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /document-template/search HTTP/1.1 Host: etc-api.vsmlab.vn Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SearchDocumentTemplateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Code>0</Code>
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d2p1:DocumentTemplate>
<d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
<d2p1:CreatedBy>0</d2p1:CreatedBy>
<d2p1:Description>String</d2p1:Description>
<d2p1:DocumentIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</d2p1:DocumentIds>
<d2p1:Documents>
<d2p1:Document>
<d2p1:Description>String</d2p1:Description>
<d2p1:DocumentCode>String</d2p1:DocumentCode>
<d2p1:DocumentGroupId>0</d2p1:DocumentGroupId>
<d2p1:DocumentNumber>String</d2p1:DocumentNumber>
<d2p1:DocumentPolicyId>0</d2p1:DocumentPolicyId>
<d2p1:DocumentTypeId>0</d2p1:DocumentTypeId>
<d2p1:EffectBeginDate>0001-01-01T00:00:00</d2p1:EffectBeginDate>
<d2p1:EffectEndDate>0001-01-01T00:00:00</d2p1:EffectEndDate>
<d2p1:IsActive>false</d2p1:IsActive>
<d2p1:IsInternal>false</d2p1:IsInternal>
<d2p1:IsUrgent>false</d2p1:IsUrgent>
<d2p1:IssuingAgencyId>0</d2p1:IssuingAgencyId>
<d2p1:Owner>String</d2p1:Owner>
<d2p1:ScopeType>0</d2p1:ScopeType>
<d2p1:SignBy>String</d2p1:SignBy>
<d2p1:SignDate>0001-01-01T00:00:00</d2p1:SignDate>
<d2p1:StatusId>0</d2p1:StatusId>
<d2p1:SubjectId>0</d2p1:SubjectId>
<d2p1:Title>String</d2p1:Title>
<d2p1:UpdateDocumentId>0</d2p1:UpdateDocumentId>
<d2p1:AccountId>0</d2p1:AccountId>
<d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
<d2p1:CreatedBy>String</d2p1:CreatedBy>
<d2p1:DeletedAt>0001-01-01T00:00:00</d2p1:DeletedAt>
<d2p1:DeletedBy>String</d2p1:DeletedBy>
<d2p1:DepartmentId>0</d2p1:DepartmentId>
<d2p1:FullTextSearchContent>String</d2p1:FullTextSearchContent>
<d2p1:Id>0</d2p1:Id>
<d2p1:IsParty>false</d2p1:IsParty>
<d2p1:IsPrivate>false</d2p1:IsPrivate>
<d2p1:IsRevisionRequested>false</d2p1:IsRevisionRequested>
<d2p1:LastUpdatedAt>0001-01-01T00:00:00</d2p1:LastUpdatedAt>
<d2p1:ProcessStatusId>0</d2p1:ProcessStatusId>
<d2p1:PublicationDate>0001-01-01T00:00:00</d2p1:PublicationDate>
<d2p1:ReasonReturn>String</d2p1:ReasonReturn>
<d2p1:UpdatedBy>String</d2p1:UpdatedBy>
</d2p1:Document>
</d2p1:Documents>
<d2p1:Id>0</d2p1:Id>
<d2p1:IsActive>false</d2p1:IsActive>
<d2p1:Title>String</d2p1:Title>
</d2p1:DocumentTemplate>
</Data>
<Message>String</Message>
<TotalCount>0</TotalCount>
</SearchDocumentTemplateResponse>