| POST | /document/search |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class DocumentSearchRequest : PagingRequest(), IDocumentSearchFilter, IPost
{
var title:String? = null
var typeId:Int? = null
var groupId:Int? = null
var subjectId:Int? = null
var issuingAgencyId:Int? = null
var isUrgent:Boolean? = null
var documentSearchStage:DocumentSearchStage? = null
var isInternal:Boolean? = null
var statusId:Int? = null
var orderBy:SearchOrderBy? = null
var fromDate:Date? = null
var toDate:Date? = null
var isParty:Boolean? = null
var scopeType:Int? = null
}
open class PagingRequest
{
var page:Int? = null
var limit:Int? = null
}
enum class DocumentSearchStage
{
All,
AllProcessing,
Draft,
PendingApproval,
IsRevisionRequested,
PendingCompilation,
PendingReport,
Published,
Active,
InActive,
}
enum class SearchOrderBy
{
UpdatedDateDesc,
PublishDateDesc,
}
open class SearchResponse : IResponseRequest
{
var totalCount:Long? = null
var code:Int? = null
@SerializedName("data") var Data:ArrayList<DocumentSearchResultItem> = ArrayList<DocumentSearchResultItem>()
var message:String? = null
}
open class DocumentSearchResultItem
{
var title:String? = null
var description:String? = null
var owner:String? = null
var documentPolicyId:Int? = null
var updateDocumentId:Int? = null
var effectBeginDate:Date? = null
var effectEndDate:Date? = null
var issuingAgencyId:Int? = null
var subjectId:Int? = null
var signBy:String? = null
var signDate:Date? = null
var updatedAt:Date? = null
var statusId:Int? = null
var isInternal:Boolean? = null
var documentNumber:String? = null
var documentCode:String? = null
var isUrgent:Boolean? = null
var id:Int? = null
var reasonReturn:String? = null
var accountId:Int? = null
var approverId:Int? = null
@StringLength(500)
var updatedBy:String? = null
@StringLength(500)
var createdBy:String? = null
var isParty:Boolean? = null
var isRevisionRequested:Boolean? = null
var isPrivate:Boolean? = null
var departmentId:Int? = null
var publicationDate:Date? = null
var processStatusId:Int? = null
var documentTypeId:Int? = null
var documentGroupId:Int? = null
var accountName:String? = null
var acceptAccountName:String? = null
var documentGroupText:String? = null
var processStatusText:String? = null
var documentTypeText:String? = null
var departmentText:String? = null
var statusText:String? = null
var issuingAgencyText:String? = null
var subjectText:String? = null
var comment:String? = null
var submitComment:String? = null
var fullFile:String? = null
var parthFile:String? = null
var isActive:Boolean? = null
var stepOrder:Int? = null
var stepCount:Int? = null
}
Kotlin DocumentSearchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /document/search HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
title: String,
typeId: 0,
groupId: 0,
subjectId: 0,
issuingAgencyId: 0,
isUrgent: False,
documentSearchStage: All,
isInternal: False,
statusId: 0,
orderBy: UpdatedDateDesc,
fromDate: "0001-01-01T00:00:00.0000000+07:06",
toDate: "0001-01-01T00:00:00.0000000+07:06",
isParty: False,
scopeType: 0,
page: 1,
limit: 10
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
totalCount: 0,
code: 0,
data:
[
{
title: String,
description: String,
owner: String,
documentPolicyId: 0,
updateDocumentId: 0,
effectBeginDate: "0001-01-01T00:00:00.0000000+07:06",
effectEndDate: "0001-01-01T00:00:00.0000000+07:06",
issuingAgencyId: 0,
subjectId: 0,
signBy: String,
signDate: "0001-01-01T00:00:00.0000000+07:06",
updatedAt: "0001-01-01T00:00:00.0000000+07:06",
statusId: 0,
isInternal: False,
documentNumber: String,
documentCode: String,
isUrgent: False,
id: 0,
reasonReturn: String,
accountId: 0,
approverId: 0,
updatedBy: String,
createdBy: String,
isParty: False,
isRevisionRequested: False,
isPrivate: False,
departmentId: 0,
publicationDate: "0001-01-01T00:00:00.0000000+07:06",
processStatusId: 0,
documentTypeId: 0,
documentGroupId: 0,
accountName: String,
acceptAccountName: String,
documentGroupText: String,
processStatusText: String,
documentTypeText: String,
departmentText: String,
statusText: String,
issuingAgencyText: String,
subjectText: String,
comment: String,
submitComment: String,
fullFile: String,
parthFile: String,
isActive: False,
stepOrder: 0,
stepCount: 0
}
],
message: String
}