| GET | /purchase-history/search |
|---|
export class PagingRequest
{
public page: number;
public limit: number;
public constructor(init?: Partial<PagingRequest>) { (Object as any).assign(this, init); }
}
export class SearchPurchaseHistoryRequest extends PagingRequest
{
public name?: string;
public workflowId?: number;
public equipmentId?: number;
public onlyMissingEquipment?: boolean;
public constructor(init?: Partial<SearchPurchaseHistoryRequest>) { super(init); (Object as any).assign(this, init); }
}
export class MongoObject implements IMongoModel
{
public id: string;
public constructor(init?: Partial<MongoObject>) { (Object as any).assign(this, init); }
}
export class AuditLog extends MongoObject implements IEntityId, ICreated, IUpdate
{
public userName?: string;
public userId?: number;
public documentId: number;
public action: string;
public description: string;
public createdDate: string;
public updatedDate: string;
public ipAddress?: string;
public userAgent?: string;
public constructor(init?: Partial<AuditLog>) { super(init); (Object as any).assign(this, init); }
}
export class Pagination
{
public total: number;
public pages: number;
public offset: number;
public limit: number;
public currentPage: number;
public constructor(init?: Partial<Pagination>) { (Object as any).assign(this, init); }
}
export class PageResponse<AuditLog> implements IResponseRequest
{
public code: number;
public message: string;
public data: AuditLog[];
public pagination: Pagination;
public constructor(init?: Partial<PageResponse<AuditLog>>) { (Object as any).assign(this, init); }
}
TypeScript SearchPurchaseHistoryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /purchase-history/search HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
code: 0,
message: String,
data:
[
{
id: 0,
workflowId: 0,
sequenceNo: 0,
detail: String,
unit: String,
quantity: 0,
unitPrice: 0,
amount: 0,
vatRate: 0,
totalAmount: 0,
note: String,
name: String,
equipmentId: 0,
purpose: String,
createdBy: 0,
workflowCode: String,
workflowTitle: String,
equipmentName: String
}
]
}