import _ from "lodash"; import type { IOwnTaxItemResponse } from "./IOwnTaxItemResponse"; export interface IOwnTaxResponse { ownTaxId: number; unitName: string; quantity: number; uploader: string; uploadDate: number; /** * 虚拟字段 */ ownTaxItems: IOwnTaxItemResponse[]; } export class TOwnTaxResponse implements IOwnTaxResponse { ownTaxId: number = 0; unitName: string = ""; quantity: number = 0; uploader: string = ""; uploadDate: number = 0; ownTaxItems: IOwnTaxItemResponse[] = []; constructor(data: Partial = {}) { if (data) { _.merge(this, _.pick(data, Object.keys(this))); } } }