source-entity.js 938 B

12345678910111213141516171819
  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. this.tileUrl = isValue(obj?.tileUrl) ? obj.tileUrl : null
  12. this.tileName = isValue(obj?.tileName) ? obj.tileName : null
  13. this.wsUrl = isValue(obj?.wsUrl) ? obj.wsUrl : null
  14. this.wsDataFlag = isValue(obj?.wsDataFlag) ? obj.wsDataFlag : null
  15. this.historyWsUrl = isValue(obj?.historyWsUrl) ? obj.historyWsUrl : null
  16. this.historyWsDataFlag = isValue(obj?.historyWsDataFlag) ? obj.historyWsDataFlag : null
  17. }
  18. }