tvpl.api

<back to all web services

GetWorkflowStepRequest

Requires Authentication
The following routes are available for this service:
GET/WorkflowStep/by-workflow
import 'package:servicestack/servicestack.dart';

class WorkflowStep implements IConvertible
{
    int? id;
    // @References(typeof(Document))
    int? workflowId;

    int? stepOrder;
    // @required()
    // @StringLength(255)
    String? stepName;

    // @required()
    bool? isRequired;

    int? slaLegalValue;
    bool? slaLegalIsByDay;
    int? slaInternalValue;
    bool? slaInternalIsByDay;
    bool? requireAttachment;
    // @required()
    String? description;

    int? createdBy;
    // @ignore()
    List<int>? departmentIds;

    // @ignore()
    List<int>? stepBasisDocumentIds;

    // @ignore()
    List<int>? stepAttachedIds;

    // @ignore()
    List<int>? mainAssigneeIds;

    WorkflowStep({this.id,this.workflowId,this.stepOrder,this.stepName,this.isRequired,this.slaLegalValue,this.slaLegalIsByDay,this.slaInternalValue,this.slaInternalIsByDay,this.requireAttachment,this.description,this.createdBy,this.departmentIds,this.stepBasisDocumentIds,this.stepAttachedIds,this.mainAssigneeIds});
    WorkflowStep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        workflowId = json['workflowId'];
        stepOrder = json['stepOrder'];
        stepName = json['stepName'];
        isRequired = json['isRequired'];
        slaLegalValue = json['slaLegalValue'];
        slaLegalIsByDay = json['slaLegalIsByDay'];
        slaInternalValue = json['slaInternalValue'];
        slaInternalIsByDay = json['slaInternalIsByDay'];
        requireAttachment = json['requireAttachment'];
        description = json['description'];
        createdBy = json['createdBy'];
        departmentIds = JsonConverters.fromJson(json['departmentIds'],'List<int>',context!);
        stepBasisDocumentIds = JsonConverters.fromJson(json['stepBasisDocumentIds'],'List<int>',context!);
        stepAttachedIds = JsonConverters.fromJson(json['stepAttachedIds'],'List<int>',context!);
        mainAssigneeIds = JsonConverters.fromJson(json['mainAssigneeIds'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'workflowId': workflowId,
        'stepOrder': stepOrder,
        'stepName': stepName,
        'isRequired': isRequired,
        'slaLegalValue': slaLegalValue,
        'slaLegalIsByDay': slaLegalIsByDay,
        'slaInternalValue': slaInternalValue,
        'slaInternalIsByDay': slaInternalIsByDay,
        'requireAttachment': requireAttachment,
        'description': description,
        'createdBy': createdBy,
        'departmentIds': JsonConverters.toJson(departmentIds,'List<int>',context!),
        'stepBasisDocumentIds': JsonConverters.toJson(stepBasisDocumentIds,'List<int>',context!),
        'stepAttachedIds': JsonConverters.toJson(stepAttachedIds,'List<int>',context!),
        'mainAssigneeIds': JsonConverters.toJson(mainAssigneeIds,'List<int>',context!)
    };

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

enum CategoryTypes
{
    Department,
    PartyGroup,
    DocGroup,
    DocType,
    IssuingAgency,
    Status,
    Subjects,
    Workflow,
}

class CreateCategoryModel implements IConvertible
{
    String? name;
    String? description;
    CategoryTypes? type;
    bool? isParty;
    // @ignore()
    List<int>? childList;

    CreateCategoryModel({this.name,this.description,this.type,this.isParty,this.childList});
    CreateCategoryModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        description = json['description'];
        type = JsonConverters.fromJson(json['type'],'CategoryTypes',context!);
        isParty = json['isParty'];
        childList = JsonConverters.fromJson(json['childList'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'description': description,
        'type': JsonConverters.toJson(type,'CategoryTypes',context!),
        'isParty': isParty,
        'childList': JsonConverters.toJson(childList,'List<int>',context!)
    };

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

class Category extends CreateCategoryModel implements IConvertible
{
    int? id;
    int? level;
    int? sortOrder;
    DateTime? lastUpdate;
    // @ignore()
    List<Category>? children;

    Category({this.id,this.level,this.sortOrder,this.lastUpdate,this.children});
    Category.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        level = json['level'];
        sortOrder = json['sortOrder'];
        lastUpdate = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
        children = JsonConverters.fromJson(json['children'],'List<Category>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id,
        'level': level,
        'sortOrder': sortOrder,
        'lastUpdate': JsonConverters.toJson(lastUpdate,'DateTime',context!),
        'children': JsonConverters.toJson(children,'List<Category>',context!)
    });

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

class SimpleDocumentRelation implements IConvertible
{
    int? id;
    String? title;
    String? documentCode;
    DateTime? publicationDate;

    SimpleDocumentRelation({this.id,this.title,this.documentCode,this.publicationDate});
    SimpleDocumentRelation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        title = json['title'];
        documentCode = json['documentCode'];
        publicationDate = JsonConverters.fromJson(json['publicationDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'title': title,
        'documentCode': documentCode,
        'publicationDate': JsonConverters.toJson(publicationDate,'DateTime',context!)
    };

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

class WorkFlowProfile implements IConvertible
{
    int? id;
    String? fullName;
    String? email;
    int? departmentId;
    String? avatar;
    String? telephone;
    DateTime? birthday;
    int? confirmStatus;

    WorkFlowProfile({this.id,this.fullName,this.email,this.departmentId,this.avatar,this.telephone,this.birthday,this.confirmStatus});
    WorkFlowProfile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        fullName = json['fullName'];
        email = json['email'];
        departmentId = json['departmentId'];
        avatar = json['avatar'];
        telephone = json['telephone'];
        birthday = JsonConverters.fromJson(json['birthday'],'DateTime',context!);
        confirmStatus = json['confirmStatus'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'fullName': fullName,
        'email': email,
        'departmentId': departmentId,
        'avatar': avatar,
        'telephone': telephone,
        'birthday': JsonConverters.toJson(birthday,'DateTime',context!),
        'confirmStatus': confirmStatus
    };

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

class BasicUploadedFile implements IConvertible
{
    String? fileName;
    String? filekey;
    String? fileUrl;
    String? checksum;
    String? eTag;
    int? fileSize;

    BasicUploadedFile({this.fileName,this.filekey,this.fileUrl,this.checksum,this.eTag,this.fileSize});
    BasicUploadedFile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        fileName = json['fileName'];
        filekey = json['filekey'];
        fileUrl = json['fileUrl'];
        checksum = json['checksum'];
        eTag = json['eTag'];
        fileSize = json['fileSize'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'fileName': fileName,
        'filekey': filekey,
        'fileUrl': fileUrl,
        'checksum': checksum,
        'eTag': eTag,
        'fileSize': fileSize
    };

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

enum AccessType
{
    Public,
    Restricted,
}

class UploadedFileModel extends BasicUploadedFile implements IConvertible
{
    int? id;
    AccessType? accessType;
    int? createdBy;
    DateTime? createdDate;

    UploadedFileModel({this.id,this.accessType,this.createdBy,this.createdDate});
    UploadedFileModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        accessType = JsonConverters.fromJson(json['accessType'],'AccessType',context!);
        createdBy = json['createdBy'];
        createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id,
        'accessType': JsonConverters.toJson(accessType,'AccessType',context!),
        'createdBy': createdBy,
        'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!)
    });

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

class UploadedFileAttach extends UploadedFileModel implements IConvertible
{
    String? fileType;
    int? subDocumentId;
    int? stepId;

    UploadedFileAttach({this.fileType,this.subDocumentId,this.stepId});
    UploadedFileAttach.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        fileType = json['fileType'];
        subDocumentId = json['subDocumentId'];
        stepId = json['stepId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'fileType': fileType,
        'subDocumentId': subDocumentId,
        'stepId': stepId
    });

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

class WorkflowStepDetail extends WorkflowStep implements IConvertible
{
    List<Category>? departments;
    List<SimpleDocumentRelation>? basisDocuments;
    List<SimpleDocumentRelation>? attachedDocuments;
    List<SimpleDocumentRelation>? referenceDocuments;
    List<WorkFlowProfile>? mainAssignees;
    List<UploadedFileAttach>? attachFiles;

    WorkflowStepDetail({this.departments,this.basisDocuments,this.attachedDocuments,this.referenceDocuments,this.mainAssignees,this.attachFiles});
    WorkflowStepDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        departments = JsonConverters.fromJson(json['departments'],'List<Category>',context!);
        basisDocuments = JsonConverters.fromJson(json['basisDocuments'],'List<SimpleDocumentRelation>',context!);
        attachedDocuments = JsonConverters.fromJson(json['attachedDocuments'],'List<SimpleDocumentRelation>',context!);
        referenceDocuments = JsonConverters.fromJson(json['referenceDocuments'],'List<SimpleDocumentRelation>',context!);
        mainAssignees = JsonConverters.fromJson(json['mainAssignees'],'List<WorkFlowProfile>',context!);
        attachFiles = JsonConverters.fromJson(json['attachFiles'],'List<UploadedFileAttach>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'departments': JsonConverters.toJson(departments,'List<Category>',context!),
        'basisDocuments': JsonConverters.toJson(basisDocuments,'List<SimpleDocumentRelation>',context!),
        'attachedDocuments': JsonConverters.toJson(attachedDocuments,'List<SimpleDocumentRelation>',context!),
        'referenceDocuments': JsonConverters.toJson(referenceDocuments,'List<SimpleDocumentRelation>',context!),
        'mainAssignees': JsonConverters.toJson(mainAssignees,'List<WorkFlowProfile>',context!),
        'attachFiles': JsonConverters.toJson(attachFiles,'List<UploadedFileAttach>',context!)
    });

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

class GetWorkflowStepResponse implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    List<WorkflowStepDetail>? data;

    GetWorkflowStepResponse({this.code,this.message,this.data});
    GetWorkflowStepResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'data': JsonConverters.toJson(data,'List<WorkflowStepDetail>',context!)
    };

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

class GetWorkflowStepRequest implements IConvertible
{
    int? workflowId;

    GetWorkflowStepRequest({this.workflowId});
    GetWorkflowStepRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        workflowId = json['workflowId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'workflowId': workflowId
    };

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

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'WorkflowStep': TypeInfo(TypeOf.Class, create:() => WorkflowStep()),
    'CategoryTypes': TypeInfo(TypeOf.Enum, enumValues:CategoryTypes.values),
    'CreateCategoryModel': TypeInfo(TypeOf.Class, create:() => CreateCategoryModel()),
    'Category': TypeInfo(TypeOf.Class, create:() => Category()),
    'List<Category>': TypeInfo(TypeOf.Class, create:() => <Category>[]),
    'SimpleDocumentRelation': TypeInfo(TypeOf.Class, create:() => SimpleDocumentRelation()),
    'WorkFlowProfile': TypeInfo(TypeOf.Class, create:() => WorkFlowProfile()),
    'BasicUploadedFile': TypeInfo(TypeOf.Class, create:() => BasicUploadedFile()),
    'AccessType': TypeInfo(TypeOf.Enum, enumValues:AccessType.values),
    'UploadedFileModel': TypeInfo(TypeOf.Class, create:() => UploadedFileModel()),
    'UploadedFileAttach': TypeInfo(TypeOf.Class, create:() => UploadedFileAttach()),
    'WorkflowStepDetail': TypeInfo(TypeOf.Class, create:() => WorkflowStepDetail()),
    'List<SimpleDocumentRelation>': TypeInfo(TypeOf.Class, create:() => <SimpleDocumentRelation>[]),
    'List<WorkFlowProfile>': TypeInfo(TypeOf.Class, create:() => <WorkFlowProfile>[]),
    'List<UploadedFileAttach>': TypeInfo(TypeOf.Class, create:() => <UploadedFileAttach>[]),
    'GetWorkflowStepResponse': TypeInfo(TypeOf.Class, create:() => GetWorkflowStepResponse()),
    'List<WorkflowStepDetail>': TypeInfo(TypeOf.Class, create:() => <WorkflowStepDetail>[]),
    'GetWorkflowStepRequest': TypeInfo(TypeOf.Class, create:() => GetWorkflowStepRequest()),
});

Dart GetWorkflowStepRequest DTOs

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

HTTP + CSV

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

GET /WorkflowStep/by-workflow HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"code":0,"message":"String","data":[{"departments":[{"id":0,"level":0,"sortOrder":0,"lastUpdate":"0001-01-01T00:00:00.0000000+07:06","children":[{"id":0,"level":0,"sortOrder":0,"lastUpdate":"0001-01-01T00:00:00.0000000+07:06","children":[{"id":0,"level":0,"sortOrder":0,"lastUpdate":"0001-01-01T00:00:00.0000000+07:06","children":null,"name":"String","description":"String","type":"Department","isParty":false,"childList":[0]}],"name":"String","description":"String","type":"Department","isParty":false,"childList":[0]}],"name":"String","description":"String","type":"Department","isParty":false,"childList":[0]}],"basisDocuments":[{"id":0,"title":"String","documentCode":"String","publicationDate":"0001-01-01T00:00:00.0000000+07:06"}],"attachedDocuments":[{"id":0,"title":"String","documentCode":"String","publicationDate":"0001-01-01T00:00:00.0000000+07:06"}],"referenceDocuments":[{"id":0,"title":"String","documentCode":"String","publicationDate":"0001-01-01T00:00:00.0000000+07:06"}],"mainAssignees":[{"id":0,"fullName":"String","email":"String","departmentId":0,"avatar":"String","telephone":"String","birthday":"0001-01-01T00:00:00.0000000+07:06","confirmStatus":0}],"attachFiles":[{"fileType":"String","subDocumentId":0,"stepId":0,"id":0,"accessType":"Public","createdBy":0,"createdDate":"0001-01-01T00:00:00.0000000+07:06","fileName":"String","filekey":"String","fileUrl":"String","checksum":"String","eTag":"String","fileSize":0}],"id":0,"workflowId":0,"stepOrder":0,"stepName":"String","isRequired":false,"slaLegalValue":0,"slaLegalIsByDay":false,"slaInternalValue":0,"slaInternalIsByDay":false,"requireAttachment":false,"description":"String","createdBy":0,"departmentIds":[0],"stepBasisDocumentIds":[0],"stepAttachedIds":[0],"mainAssigneeIds":[0]}]}