Added car connector properties
MODIFY
src/server/rest/v1/service/security/CarSecurity.ts
src/server/rest/v1/service/security/CarSecurity.ts
@@ -55,6 +55,8 @@ export default class CarSecurity {
type: sanitize(request.converter.type),
powerWatts: sanitize(request.converter.powerWatts)
},
+ carConnectorID: sanitize(request.carConnectorID),
+ carConnectorMeterID: sanitize(request.carConnectorMeterID)
};
}
@@ -73,6 +75,8 @@ export default class CarSecurity {
type: sanitize(request.converter.type),
powerWatts: sanitize(request.converter.powerWatts)
},
+ carConnectorID: sanitize(request.carConnectorID),
+ carConnectorMeterID: sanitize(request.carConnectorMeterID)
};
return filteredRequest;
}

MODIFY
src/types/Car.ts
src/types/Car.ts
import { AuthorizationActions } from './Authorization';
import CreatedUpdatedProps from './CreatedUpdatedProps';
+import { CarConnectorConnectionSetting } from './Setting';
export interface CarCatalog extends CreatedUpdatedProps, AuthorizationActions {
id: number;
@@ -138,6 +139,9 @@ export interface Car extends CreatedUpdatedProps, AuthorizationActions {
default: boolean;
type?: CarType;
converter?: CarConverter;
+ carConnectorID?: string;
+ carConnectorMeterID?: string;
+ carConnector?: CarConnectorConnectionSetting
}
export interface CarConverter {

MODIFY
src/types/requests/HttpCarRequest.ts
src/types/requests/HttpCarRequest.ts
import { CarConverter, CarType } from '../Car';
+import { CarConnectorConnectionSetting } from '../Setting';
import HttpByIDRequest from './HttpByIDRequest';
import HttpDatabaseRequest from './HttpDatabaseRequest';
@@ -34,6 +35,8 @@ export interface HttpCarCreateRequest {
converter?: CarConverter;
userID: string;
default: boolean;
+ carConnectorID: string;
+ carConnectorMeterID: string;
}
export interface HttpCarUpdateRequest {
@@ -46,6 +49,8 @@ export interface HttpCarUpdateRequest {
converter?: CarConverter;
userID: string;
default: boolean;
+ carConnectorID: string;
+ carConnectorMeterID: string;
}
export interface HttpCarsRequest extends HttpDatabaseRequest {

Added car connector properties