| 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 DocumentTemplate implements IConvertible
{
int? id;
// @required()
String? title;
String? description;
bool? isActive;
String? fileKey;
String? fileUrl;
String? fileName;
int? fileSize;
DocumentTemplate({this.id,this.title,this.description,this.isActive,this.fileKey,this.fileUrl,this.fileName,this.fileSize});
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'];
fileKey = json['fileKey'];
fileUrl = json['fileUrl'];
fileName = json['fileName'];
fileSize = json['fileSize'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'description': description,
'isActive': isActive,
'fileKey': fileKey,
'fileUrl': fileUrl,
'fileName': fileName,
'fileSize': fileSize
};
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;
bool? isActive;
SearchTemplateRequest({this.title,this.isActive});
SearchTemplateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
title = json['title'];
isActive = json['isActive'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'title': title,
'isActive': isActive
});
getTypeName() => "SearchTemplateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'qlcn_api.vsmlab.vn', types: <String, TypeInfo> {
'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()),
'DocumentTemplate': TypeInfo(TypeOf.Class, create:() => DocumentTemplate()),
'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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: qlcn-api.vsmlab.vn Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"code":0,"message":"String","data":[{"id":0,"title":"String","description":"String","isActive":false,"fileKey":"String","fileUrl":"String","fileName":"String","fileSize":0}],"totalCount":0}