| GET | /document-template/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.Models
Namespace Global
Namespace tvpl.api.ServiceModel
Public Partial Class PagingRequest
Public Overridable Property Page As Integer
Public Overridable Property Limit As Integer
End Class
Public Partial Class SearchDocumentTemplateResponse
Implements IResponseRequest
Public Sub New()
Data = New List(Of DocumentTemplate)
End Sub
Public Overridable Property Code As Integer
Public Overridable Property Message As String
Public Overridable Property Data As List(Of DocumentTemplate)
Public Overridable Property TotalCount As Long
End Class
Public Partial Class SearchTemplateRequest
Inherits PagingRequest
Public Overridable Property Title As String
End Class
End Namespace
Namespace tvpl.data.Models
Public Partial Class BasicDocument
<Required>
Public Overridable Property Title As String
<StringLength(4000)>
Public Overridable Property Description As String
<StringLength(500)>
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 DocumentTypeId As Nullable(Of Integer)
Public Overridable Property DocumentGroupId As Nullable(Of Integer)
Public Overridable Property SubjectId As Nullable(Of Integer)
<StringLength(500)>
Public Overridable Property SignBy As String
Public Overridable Property SignDate 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 ScopeType As Nullable(Of Integer)
Public Overridable Property IsActive As Nullable(Of Boolean)
End Class
Public Partial Class Document
Inherits BasicDocument
Public Overridable Property Id As Integer
<StringLength(500)>
Public Overridable Property ReasonReturn As String
Public Overridable Property AccountId As Nullable(Of Integer)
Public Overridable Property DeletedAt As Nullable(Of Date)
<StringLength(500)>
Public Overridable Property DeletedBy As String
<StringLength(500)>
Public Overridable Property UpdatedBy As String
Public Overridable Property CreatedAt As Nullable(Of Date)
<StringLength(500)>
Public Overridable Property CreatedBy As String
Public Overridable Property IsParty As Nullable(Of Boolean)
Public Overridable Property IsRevisionRequested As Boolean
Public Overridable Property LastUpdatedAt As Nullable(Of Date)
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 Nullable(Of Integer)
Public Overridable Property FullTextSearchContent As String
End Class
Public Partial Class DocumentTemplate
Public Sub New()
DocumentIds = New List(Of Integer)
Documents = New List(Of Document)
End Sub
Public Overridable Property Id As Integer
<Required>
Public Overridable Property Title As String
Public Overridable Property Description As String
Public Overridable Property IsActive As Boolean
<Ignore>
Public Overridable Property DocumentIds As List(Of Integer)
<Ignore>
Public Overridable Property Documents As List(Of Document)
End Class
End Namespace
End Namespace
VB.NET SearchTemplateRequest 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.
GET /document-template/search HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"code":0,"message":"String","data":[{"id":0,"title":"String","description":"String","isActive":false,"documentIds":[0],"documents":[{"id":0,"reasonReturn":"String","accountId":0,"deletedAt":"0001-01-01T00:00:00.0000000+07:06","deletedBy":"String","updatedBy":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":"String","isParty":false,"isRevisionRequested":false,"lastUpdatedAt":"0001-01-01T00:00:00.0000000+07:06","isPrivate":false,"departmentId":0,"publicationDate":"0001-01-01T00:00:00.0000000+07:06","processStatusId":0,"fullTextSearchContent":"String","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,"documentTypeId":0,"documentGroupId":0,"subjectId":0,"signBy":"String","signDate":"0001-01-01T00:00:00.0000000+07:06","statusId":0,"isInternal":false,"documentNumber":"String","documentCode":"String","isUrgent":false,"scopeType":0,"isActive":false}]}],"totalCount":0}