import { formatterMillisecond } from "./utils/date"; class AuditRecord { constructor(params = {}) { this.id = params.id; this.orgId = params.org_id; this.createBy = params.create_by; this.createTime = params.create_time; this.updateBy = params.update_by; this.updateTime = params.update_time; if (params.creator) { this.creator = { memberId: params.creator["member_id"], name: params.creator["name"], }; } if (params.updater) { this.updater = { memberId: params.updater["member_id"], name: params.updater["name"], }; } } get createTimeFormat() { return formatterMillisecond(this.createTime); } get updateTimeFormat() { return formatterMillisecond(this.updateTime); } } export default AuditRecord;