source-entity.js 484 B

123456789101112
  1. import {convertToCamelCase, isValue, YMDHms} from "../../util/index.js";
  2. export default class SourceEntity {
  3. constructor(obj) {
  4. convertToCamelCase(obj)
  5. this.name = isValue(obj?.name) ? obj.name : null
  6. this.sort = isValue(obj?.sort) ? obj.sort : 0
  7. this.remark = isValue(obj?.remark) ? obj.remark : null
  8. this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
  9. this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
  10. }
  11. }