import _ from "lodash"; export interface IProfileResponse { profileId: number; unitName: string; quantity: number; uploader: string; uploadDate: number; /** * 内容 */ content: string; } export class TProfileResponse implements IProfileResponse { profileId: number = 0; unitName: string = ""; quantity: number = 0; uploader: string = ""; uploadDate: number = 0; content: string = ""; constructor(data: Partial = {}) { if (data) { _.merge(this, _.pick(data, Object.keys(this))); } } }