source-entity.js 515 B

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