| POST | /document/search |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports tvpl.api.ServiceModel
Imports tvpl.data.Constant
Imports tvpl.data.Models
Namespace Global
Namespace tvpl.api.ServiceModel
Public Partial Class DocumentSearchRequest
Inherits PagingRequest
Implements IDocumentSearchFilter
Implements IPost
Public Overridable Property Title As String
Public Overridable Property TypeId As Nullable(Of Integer)
Public Overridable Property GroupId As Nullable(Of Integer)
Public Overridable Property SubjectId As Nullable(Of Integer)
Public Overridable Property IssuingAgencyId As Nullable(Of Integer)
Public Overridable Property IsUrgent As Nullable(Of Boolean)
Public Overridable Property DocumentSearchStage As DocumentSearchStage
Public Overridable Property IsInternal As Nullable(Of Boolean)
Public Overridable Property StatusId As Nullable(Of Integer)
Public Overridable Property OrderBy As SearchOrderBy
Public Overridable Property FromDate As Nullable(Of Date)
Public Overridable Property ToDate As Nullable(Of Date)
Public Overridable Property IsParty As Nullable(Of Boolean)
Public Overridable Property ScopeType As Integer
End Class
Public Partial Class PagingRequest
Public Overridable Property Page As Integer
Public Overridable Property Limit As Integer
End Class
Public Partial Class SearchResponse
Implements IResponseRequest
Public Sub New()
Data = New List(Of DocumentSearchResultItem)
End Sub
Public Overridable Property TotalCount As Long
Public Overridable Property Code As Integer
Public Overridable Property Data As List(Of DocumentSearchResultItem)
Public Overridable Property Message As String
End Class
End Namespace
Namespace tvpl.data.Constant
Public Enum DocumentSearchStage
All
AllProcessing
Draft
PendingApproval
IsRevisionRequested
PendingCompilation
PendingReport
Published
Active
InActive
End Enum
Public Enum SearchOrderBy
UpdatedDateDesc
PublishDateDesc
End Enum
End Namespace
Namespace tvpl.data.Models
Public Partial Class DocumentSearchResultItem
Public Overridable Property Title As String
Public Overridable Property Description As String
Public Overridable Property Owner As String
Public Overridable Property DocumentPolicyId As Nullable(Of Integer)
Public Overridable Property UpdateDocumentId As Nullable(Of Integer)
Public Overridable Property EffectBeginDate As Nullable(Of Date)
Public Overridable Property EffectEndDate As Nullable(Of Date)
Public Overridable Property IssuingAgencyId As Nullable(Of Integer)
Public Overridable Property SubjectId As Nullable(Of Integer)
Public Overridable Property SignBy As String
Public Overridable Property SignDate As Nullable(Of Date)
Public Overridable Property UpdatedAt As Nullable(Of Date)
Public Overridable Property StatusId As Nullable(Of Integer)
Public Overridable Property IsInternal As Boolean
Public Overridable Property DocumentNumber As String
Public Overridable Property DocumentCode As String
Public Overridable Property IsUrgent As Nullable(Of Boolean)
Public Overridable Property Id As Integer
Public Overridable Property ReasonReturn As String
Public Overridable Property AccountId As Nullable(Of Integer)
Public Overridable Property ApproverId As Nullable(Of Integer)
<StringLength(500)>
Public Overridable Property UpdatedBy As String
<StringLength(500)>
Public Overridable Property CreatedBy As String
Public Overridable Property IsParty As Nullable(Of Boolean)
Public Overridable Property IsRevisionRequested As Nullable(Of Boolean)
Public Overridable Property IsPrivate As Nullable(Of Boolean)
Public Overridable Property DepartmentId As Nullable(Of Integer)
Public Overridable Property PublicationDate As Nullable(Of Date)
Public Overridable Property ProcessStatusId As Integer
Public Overridable Property DocumentTypeId As Nullable(Of Integer)
Public Overridable Property DocumentGroupId As Nullable(Of Integer)
Public Overridable Property AccountName As String
Public Overridable Property AcceptAccountName As String
Public Overridable Property DocumentGroupText As String
Public Overridable Property ProcessStatusText As String
Public Overridable Property DocumentTypeText As String
Public Overridable Property DepartmentText As String
Public Overridable Property StatusText As String
Public Overridable Property IssuingAgencyText As String
Public Overridable Property SubjectText As String
Public Overridable Property Comment As String
Public Overridable Property SubmitComment As String
Public Overridable Property FullFile As String
Public Overridable Property ParthFile As String
Public Overridable Property IsActive As Nullable(Of Boolean)
Public Overridable Property StepOrder As Nullable(Of Integer)
Public Overridable Property StepCount As Nullable(Of Integer)
End Class
End Namespace
End Namespace
VB.NET DocumentSearchRequest 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 /document/search HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
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"}