@ironcode/vas-lib 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,10 +42,10 @@ class VasBaseModel {
42
42
  id: UUID.UUID(),
43
43
  created: moment().toISOString(),
44
44
  modified: moment().toISOString(),
45
- createdBy: user.id,
46
- createdByName: user.name,
47
- modifiedBy: user.id,
48
- modifiedByName: user.name
45
+ createdBy: user?.id || '',
46
+ createdByName: user?.name || '',
47
+ modifiedBy: user?.id || '',
48
+ modifiedByName: user?.name || ''
49
49
  });
50
50
  }
51
51
  }
@@ -2342,7 +2342,7 @@ class VasReportRequestModel extends VasAccountObjectModel {
2342
2342
  }
2343
2343
 
2344
2344
  class VasVehicleModel extends VasAccountObjectModel {
2345
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, registration, make, model, archived) {
2345
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, registration, make, model, archived, description) {
2346
2346
  super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
2347
2347
  this.id = id;
2348
2348
  this.created = created;
@@ -2358,9 +2358,10 @@ class VasVehicleModel extends VasAccountObjectModel {
2358
2358
  this.make = make;
2359
2359
  this.model = model;
2360
2360
  this.archived = archived;
2361
+ this.description = description;
2361
2362
  }
2362
2363
  static fromDto(dto) {
2363
- return new VasVehicleModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.registration || '', dto.make || '', dto.model || '', dto.archived || false);
2364
+ return new VasVehicleModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.registration || '', dto.make || '', dto.model || '', dto.archived || false, dto.description || '');
2364
2365
  }
2365
2366
  toDto() {
2366
2367
  return {
@@ -2377,7 +2378,8 @@ class VasVehicleModel extends VasAccountObjectModel {
2377
2378
  registration: this.registration,
2378
2379
  make: this.make,
2379
2380
  model: this.model,
2380
- archived: this.archived
2381
+ archived: this.archived,
2382
+ description: this.description
2381
2383
  };
2382
2384
  }
2383
2385
  toApiDto(options) {
@@ -2389,7 +2391,8 @@ class VasVehicleModel extends VasAccountObjectModel {
2389
2391
  registration: this.registration,
2390
2392
  make: this.make,
2391
2393
  model: this.model,
2392
- archived: this.archived
2394
+ archived: this.archived,
2395
+ description: this.description
2393
2396
  };
2394
2397
  }
2395
2398
  }