tvpl.api

<back to all web services

SearchDocumentPolicyRequest

Requires Authentication
The following routes are available for this service:
GET/DocumentPolicy
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 DocumentPolicyFilter extends PagingRequest implements IConvertible
{
    int? departmentId;
    String? name;
    bool? isApproved;

    DocumentPolicyFilter({this.departmentId,this.name,this.isApproved});
    DocumentPolicyFilter.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        departmentId = json['departmentId'];
        name = json['name'];
        isApproved = json['isApproved'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'departmentId': departmentId,
        'name': name,
        'isApproved': isApproved
    });

    getTypeName() => "DocumentPolicyFilter";
    TypeContext? context = _ctx;
}

class UpdateDocumentPolicyModel implements IConvertible
{
    int? id;
    String? policyCode;
    String? title;
    String? documentLink;
    int? documentGroupId;
    String? description;
    int? approvedBy;
    // @required()
    int? departmentLeadId;

    int? departmentCoId;

    UpdateDocumentPolicyModel({this.id,this.policyCode,this.title,this.documentLink,this.documentGroupId,this.description,this.approvedBy,this.departmentLeadId,this.departmentCoId});
    UpdateDocumentPolicyModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        policyCode = json['policyCode'];
        title = json['title'];
        documentLink = json['documentLink'];
        documentGroupId = json['documentGroupId'];
        description = json['description'];
        approvedBy = json['approvedBy'];
        departmentLeadId = json['departmentLeadId'];
        departmentCoId = json['departmentCoId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'policyCode': policyCode,
        'title': title,
        'documentLink': documentLink,
        'documentGroupId': documentGroupId,
        'description': description,
        'approvedBy': approvedBy,
        'departmentLeadId': departmentLeadId,
        'departmentCoId': departmentCoId
    };

    getTypeName() => "UpdateDocumentPolicyModel";
    TypeContext? context = _ctx;
}

class DocumentPolicy extends UpdateDocumentPolicyModel implements IConvertible
{
    DateTime? approvedDate;
    DateTime? estimatedDeadline;
    bool? isApproved;
    // @required()
    int? createdBy;

    DateTime? createdDate;
    DateTime? deletedAt;
    int? deletedBy;
    String? approvalComment;
    bool? isDeleted;
    DateTime? lastUpdateAt;
    int? updatedBy;

    DocumentPolicy({this.approvedDate,this.estimatedDeadline,this.isApproved,this.createdBy,this.createdDate,this.deletedAt,this.deletedBy,this.approvalComment,this.isDeleted,this.lastUpdateAt,this.updatedBy});
    DocumentPolicy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        approvedDate = JsonConverters.fromJson(json['approvedDate'],'DateTime',context!);
        estimatedDeadline = JsonConverters.fromJson(json['estimatedDeadline'],'DateTime',context!);
        isApproved = json['isApproved'];
        createdBy = json['createdBy'];
        createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!);
        deletedAt = JsonConverters.fromJson(json['deletedAt'],'DateTime',context!);
        deletedBy = json['deletedBy'];
        approvalComment = json['approvalComment'];
        isDeleted = json['isDeleted'];
        lastUpdateAt = JsonConverters.fromJson(json['lastUpdateAt'],'DateTime',context!);
        updatedBy = json['updatedBy'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'approvedDate': JsonConverters.toJson(approvedDate,'DateTime',context!),
        'estimatedDeadline': JsonConverters.toJson(estimatedDeadline,'DateTime',context!),
        'isApproved': isApproved,
        'createdBy': createdBy,
        'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!),
        'deletedAt': JsonConverters.toJson(deletedAt,'DateTime',context!),
        'deletedBy': deletedBy,
        'approvalComment': approvalComment,
        'isDeleted': isDeleted,
        'lastUpdateAt': JsonConverters.toJson(lastUpdateAt,'DateTime',context!),
        'updatedBy': updatedBy
    });

    getTypeName() => "DocumentPolicy";
    TypeContext? context = _ctx;
}

class DocumentPolicyResponse implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    List<DocumentPolicy>? documentPolicy;
    int? unapprovedCount;
    int? totalCount;

    DocumentPolicyResponse({this.code,this.message,this.documentPolicy,this.unapprovedCount,this.totalCount});
    DocumentPolicyResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        documentPolicy = JsonConverters.fromJson(json['documentPolicy'],'List<DocumentPolicy>',context!);
        unapprovedCount = json['unapprovedCount'];
        totalCount = json['totalCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'documentPolicy': JsonConverters.toJson(documentPolicy,'List<DocumentPolicy>',context!),
        'unapprovedCount': unapprovedCount,
        'totalCount': totalCount
    };

    getTypeName() => "DocumentPolicyResponse";
    TypeContext? context = _ctx;
}

class SearchDocumentPolicyRequest extends DocumentPolicyFilter implements IGet, IConvertible
{
    SearchDocumentPolicyRequest();
    SearchDocumentPolicyRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "SearchDocumentPolicyRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()),
    'DocumentPolicyFilter': TypeInfo(TypeOf.Class, create:() => DocumentPolicyFilter()),
    'UpdateDocumentPolicyModel': TypeInfo(TypeOf.Class, create:() => UpdateDocumentPolicyModel()),
    'DocumentPolicy': TypeInfo(TypeOf.Class, create:() => DocumentPolicy()),
    'DocumentPolicyResponse': TypeInfo(TypeOf.Class, create:() => DocumentPolicyResponse()),
    'List<DocumentPolicy>': TypeInfo(TypeOf.Class, create:() => <DocumentPolicy>[]),
    'SearchDocumentPolicyRequest': TypeInfo(TypeOf.Class, create:() => SearchDocumentPolicyRequest()),
});

Dart SearchDocumentPolicyRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /DocumentPolicy HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DocumentPolicyResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Code>0</Code>
  <DocumentPolicy xmlns:d2p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
    <d2p1:DocumentPolicy>
      <d2p1:ApprovedBy>0</d2p1:ApprovedBy>
      <d2p1:DepartmentCoId>0</d2p1:DepartmentCoId>
      <d2p1:DepartmentLeadId>0</d2p1:DepartmentLeadId>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:DocumentGroupId>0</d2p1:DocumentGroupId>
      <d2p1:DocumentLink>String</d2p1:DocumentLink>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:PolicyCode>String</d2p1:PolicyCode>
      <d2p1:Title>String</d2p1:Title>
      <d2p1:ApprovalComment>String</d2p1:ApprovalComment>
      <d2p1:ApprovedDate>0001-01-01T00:00:00</d2p1:ApprovedDate>
      <d2p1:CreatedBy>0</d2p1:CreatedBy>
      <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
      <d2p1:DeletedAt>0001-01-01T00:00:00</d2p1:DeletedAt>
      <d2p1:DeletedBy>0</d2p1:DeletedBy>
      <d2p1:EstimatedDeadline>0001-01-01T00:00:00</d2p1:EstimatedDeadline>
      <d2p1:IsApproved>false</d2p1:IsApproved>
      <d2p1:IsDeleted>false</d2p1:IsDeleted>
      <d2p1:LastUpdateAt>0001-01-01T00:00:00</d2p1:LastUpdateAt>
      <d2p1:UpdatedBy>0</d2p1:UpdatedBy>
    </d2p1:DocumentPolicy>
  </DocumentPolicy>
  <Message>String</Message>
  <TotalCount>0</TotalCount>
  <UnapprovedCount>0</UnapprovedCount>
</DocumentPolicyResponse>