tvpl.api

<back to all web services

GetAdvancedWorkflowInfoRequest

Requires Authentication
The following routes are available for this service:
GET/workflow/{WorkflowId}/advanced-info
import 'package:servicestack/servicestack.dart';

class Provider implements IConvertible
{
    int? id;
    String? name;
    String? taxCode;
    String? address;
    String? email;
    String? phone;
    String? additionalInfo;
    int? providerType;
    DateTime? createdAt;
    int? createdBy;

    Provider({this.id,this.name,this.taxCode,this.address,this.email,this.phone,this.additionalInfo,this.providerType,this.createdAt,this.createdBy});
    Provider.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        taxCode = json['taxCode'];
        address = json['address'];
        email = json['email'];
        phone = json['phone'];
        additionalInfo = json['additionalInfo'];
        providerType = json['providerType'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'taxCode': taxCode,
        'address': address,
        'email': email,
        'phone': phone,
        'additionalInfo': additionalInfo,
        'providerType': providerType,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy
    };

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

class Contract implements IConvertible
{
    int? id;
    // @required()
    int? workflowId;

    // @StringLength(100)
    String? contractNo;

    // @StringLength(100)
    String? contractDate;

    String? serviceName;
    // @StringLength(100)
    String? contractType;

    String? objective;
    String? location;
    DateTime? createdAt;
    // @required()
    int? createdBy;

    Contract({this.id,this.workflowId,this.contractNo,this.contractDate,this.serviceName,this.contractType,this.objective,this.location,this.createdAt,this.createdBy});
    Contract.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        workflowId = json['workflowId'];
        contractNo = json['contractNo'];
        contractDate = json['contractDate'];
        serviceName = json['serviceName'];
        contractType = json['contractType'];
        objective = json['objective'];
        location = json['location'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'workflowId': workflowId,
        'contractNo': contractNo,
        'contractDate': contractDate,
        'serviceName': serviceName,
        'contractType': contractType,
        'objective': objective,
        'location': location,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy
    };

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

class Estimate implements IConvertible
{
    int? id;
    // @required()
    int? workflowId;

    int? valueBeforeTax;
    int? taxAmount;
    int? totalAmount;
    DateTime? createdAt;
    // @required()
    int? createdBy;

    Estimate({this.id,this.workflowId,this.valueBeforeTax,this.taxAmount,this.totalAmount,this.createdAt,this.createdBy});
    Estimate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        workflowId = json['workflowId'];
        valueBeforeTax = json['valueBeforeTax'];
        taxAmount = json['taxAmount'];
        totalAmount = json['totalAmount'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'workflowId': workflowId,
        'valueBeforeTax': valueBeforeTax,
        'taxAmount': taxAmount,
        'totalAmount': totalAmount,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy
    };

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

class PurchaseHistory implements IConvertible
{
    int? id;
    // @required()
    int? workflowId;

    int? sequenceNo;
    String? detail;
    // @StringLength(150)
    String? unit;

    int? quantity;
    int? unitPrice;
    int? amount;
    String? note;
    DateTime? createdAt;
    // @required()
    int? createdBy;

    PurchaseHistory({this.id,this.workflowId,this.sequenceNo,this.detail,this.unit,this.quantity,this.unitPrice,this.amount,this.note,this.createdAt,this.createdBy});
    PurchaseHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        workflowId = json['workflowId'];
        sequenceNo = json['sequenceNo'];
        detail = json['detail'];
        unit = json['unit'];
        quantity = json['quantity'];
        unitPrice = json['unitPrice'];
        amount = json['amount'];
        note = json['note'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'workflowId': workflowId,
        'sequenceNo': sequenceNo,
        'detail': detail,
        'unit': unit,
        'quantity': quantity,
        'unitPrice': unitPrice,
        'amount': amount,
        'note': note,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy
    };

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

class AdvancedWorkflowInfoData implements IConvertible
{
    Provider? provider;
    Contract? contract;
    Estimate? estimate;
    List<PurchaseHistory>? purchaseHistory;

    AdvancedWorkflowInfoData({this.provider,this.contract,this.estimate,this.purchaseHistory});
    AdvancedWorkflowInfoData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        provider = JsonConverters.fromJson(json['provider'],'Provider',context!);
        contract = JsonConverters.fromJson(json['contract'],'Contract',context!);
        estimate = JsonConverters.fromJson(json['estimate'],'Estimate',context!);
        purchaseHistory = JsonConverters.fromJson(json['purchaseHistory'],'List<PurchaseHistory>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'provider': JsonConverters.toJson(provider,'Provider',context!),
        'contract': JsonConverters.toJson(contract,'Contract',context!),
        'estimate': JsonConverters.toJson(estimate,'Estimate',context!),
        'purchaseHistory': JsonConverters.toJson(purchaseHistory,'List<PurchaseHistory>',context!)
    };

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

class AdvancedWorkflowInfoResponse implements IConvertible
{
    int? code;
    String? message;
    AdvancedWorkflowInfoData? data;

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

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

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

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

class GetAdvancedWorkflowInfoRequest implements IConvertible
{
    int? workflowId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'Provider': TypeInfo(TypeOf.Class, create:() => Provider()),
    'Contract': TypeInfo(TypeOf.Class, create:() => Contract()),
    'Estimate': TypeInfo(TypeOf.Class, create:() => Estimate()),
    'PurchaseHistory': TypeInfo(TypeOf.Class, create:() => PurchaseHistory()),
    'AdvancedWorkflowInfoData': TypeInfo(TypeOf.Class, create:() => AdvancedWorkflowInfoData()),
    'List<PurchaseHistory>': TypeInfo(TypeOf.Class, create:() => <PurchaseHistory>[]),
    'AdvancedWorkflowInfoResponse': TypeInfo(TypeOf.Class, create:() => AdvancedWorkflowInfoResponse()),
    'GetAdvancedWorkflowInfoRequest': TypeInfo(TypeOf.Class, create:() => GetAdvancedWorkflowInfoRequest()),
});

Dart GetAdvancedWorkflowInfoRequest DTOs

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

HTTP + OTHER

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

GET /workflow/{WorkflowId}/advanced-info 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":{"provider":{"id":0,"name":"String","taxCode":"String","address":"String","email":"String","phone":"String","additionalInfo":"String","providerType":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0},"contract":{"id":0,"workflowId":0,"contractNo":"String","contractDate":"String","serviceName":"String","contractType":"String","objective":"String","location":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0},"estimate":{"id":0,"workflowId":0,"valueBeforeTax":0,"taxAmount":0,"totalAmount":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0},"purchaseHistory":[{"id":0,"workflowId":0,"sequenceNo":0,"detail":"String","unit":"String","quantity":0,"unitPrice":0,"amount":0,"note":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0}]}}