UNPKG

@citrineos/data

Version:

The OCPP data module which includes all persistence layer implementation.

267 lines 10.4 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { Column, DataType, HasMany, Model, PrimaryKey, Table } from 'sequelize-typescript'; import { Authorization, LocalListAuthorization, LocalListVersion, LocalListVersionAuthorization, SendLocalList, SendLocalListAuthorization, } from './Authorization/index.js'; import { Boot } from './Boot.js'; import { Certificate, InstalledCertificate } from './Certificate/index.js'; import { ChangeConfiguration } from './ChangeConfiguration.js'; import { ChargingNeeds, ChargingProfile, ChargingSchedule, CompositeSchedule, SalesTariff, } from './ChargingProfile/index.js'; import { ChargingStationSecurityInfo } from './ChargingStationSecurityInfo.js'; import { ChargingStationSequence } from './ChargingStationSequence/index.js'; import { ComponentVariable } from './DeviceModel/ComponentVariable.js'; import { Component, EvseType, Variable, VariableAttribute, VariableCharacteristics, VariableStatus, } from './DeviceModel/index.js'; import { ChargingStation, ChargingStationNetworkProfile, Connector, LatestStatusNotification, ServerNetworkProfile, SetNetworkProfile, StatusNotification, } from './Location/index.js'; import { Location } from './Location/Location.js'; import { MessageInfo } from './MessageInfo/index.js'; import { OCPPMessage } from './OCPPMessage.js'; import { Reservation } from './Reservation.js'; import { SecurityEvent } from './SecurityEvent.js'; import { Subscription } from './Subscription/index.js'; import { Tariff } from './Tariff/index.js'; import { TenantPartner } from './TenantPartner.js'; import { MeterValue, StartTransaction, StopTransaction, Transaction, TransactionEvent, } from './TransactionEvent/index.js'; import { EventData, VariableMonitoring, VariableMonitoringStatus, } from './VariableMonitoring/index.js'; export var TenantAttributeProps; (function (TenantAttributeProps) { TenantAttributeProps["id"] = "id"; TenantAttributeProps["createdAt"] = "createdAt"; TenantAttributeProps["updatedAt"] = "updatedAt"; })(TenantAttributeProps || (TenantAttributeProps = {})); let Tenant = class Tenant extends Model { static MODEL_NAME = 'Tenant'; }; __decorate([ PrimaryKey, Column({ type: DataType.INTEGER, autoIncrement: true, }), __metadata("design:type", Number) ], Tenant.prototype, "id", void 0); __decorate([ Column(DataType.STRING), __metadata("design:type", String) ], Tenant.prototype, "name", void 0); __decorate([ Column(DataType.STRING), __metadata("design:type", Object) ], Tenant.prototype, "url", void 0); __decorate([ Column(DataType.STRING), __metadata("design:type", Object) ], Tenant.prototype, "partyId", void 0); __decorate([ Column(DataType.STRING), __metadata("design:type", Object) ], Tenant.prototype, "countryCode", void 0); __decorate([ Column(DataType.JSONB), __metadata("design:type", Object) ], Tenant.prototype, "serverProfileOCPI", void 0); __decorate([ Column({ type: DataType.BOOLEAN, defaultValue: false, }), __metadata("design:type", Boolean) ], Tenant.prototype, "isUserTenant", void 0); __decorate([ HasMany(() => TenantPartner), __metadata("design:type", Array) ], Tenant.prototype, "tenantPartners", void 0); __decorate([ HasMany(() => Authorization), __metadata("design:type", Array) ], Tenant.prototype, "authorizations", void 0); __decorate([ HasMany(() => Boot), __metadata("design:type", Array) ], Tenant.prototype, "boots", void 0); __decorate([ HasMany(() => Certificate), __metadata("design:type", Array) ], Tenant.prototype, "certificates", void 0); __decorate([ HasMany(() => InstalledCertificate), __metadata("design:type", Array) ], Tenant.prototype, "installedCertificates", void 0); __decorate([ HasMany(() => ChangeConfiguration), __metadata("design:type", Array) ], Tenant.prototype, "changeConfigurations", void 0); __decorate([ HasMany(() => ChargingNeeds), __metadata("design:type", Array) ], Tenant.prototype, "chargingNeeds", void 0); __decorate([ HasMany(() => ChargingProfile), __metadata("design:type", Array) ], Tenant.prototype, "chargingProfiles", void 0); __decorate([ HasMany(() => ChargingSchedule), __metadata("design:type", Array) ], Tenant.prototype, "chargingSchedules", void 0); __decorate([ HasMany(() => ChargingStation), __metadata("design:type", Array) ], Tenant.prototype, "chargingStations", void 0); __decorate([ HasMany(() => ChargingStationNetworkProfile), __metadata("design:type", Array) ], Tenant.prototype, "chargingStationNetworkProfiles", void 0); __decorate([ HasMany(() => ChargingStationSecurityInfo), __metadata("design:type", Array) ], Tenant.prototype, "chargingStationSecurityInfos", void 0); __decorate([ HasMany(() => ChargingStationSequence), __metadata("design:type", Array) ], Tenant.prototype, "chargingStationSequences", void 0); __decorate([ HasMany(() => Component), __metadata("design:type", Array) ], Tenant.prototype, "components", void 0); __decorate([ HasMany(() => ComponentVariable), __metadata("design:type", Array) ], Tenant.prototype, "componentVariables", void 0); __decorate([ HasMany(() => CompositeSchedule), __metadata("design:type", Array) ], Tenant.prototype, "compositeSchedules", void 0); __decorate([ HasMany(() => Connector), __metadata("design:type", Array) ], Tenant.prototype, "connectors", void 0); __decorate([ HasMany(() => EvseType), __metadata("design:type", Array) ], Tenant.prototype, "evses", void 0); __decorate([ HasMany(() => EventData), __metadata("design:type", Array) ], Tenant.prototype, "eventDatas", void 0); __decorate([ HasMany(() => Location), __metadata("design:type", Array) ], Tenant.prototype, "locations", void 0); __decorate([ HasMany(() => MeterValue), __metadata("design:type", Array) ], Tenant.prototype, "meterValues", void 0); __decorate([ HasMany(() => MessageInfo), __metadata("design:type", Array) ], Tenant.prototype, "messageInfos", void 0); __decorate([ HasMany(() => OCPPMessage), __metadata("design:type", Array) ], Tenant.prototype, "ocppMessages", void 0); __decorate([ HasMany(() => Reservation), __metadata("design:type", Array) ], Tenant.prototype, "reservations", void 0); __decorate([ HasMany(() => SalesTariff), __metadata("design:type", Array) ], Tenant.prototype, "salesTariffs", void 0); __decorate([ HasMany(() => SecurityEvent), __metadata("design:type", Array) ], Tenant.prototype, "securityEvents", void 0); __decorate([ HasMany(() => SetNetworkProfile), __metadata("design:type", Array) ], Tenant.prototype, "setNetworkProfiles", void 0); __decorate([ HasMany(() => ServerNetworkProfile), __metadata("design:type", Array) ], Tenant.prototype, "serverNetworkProfiles", void 0); __decorate([ HasMany(() => Transaction), __metadata("design:type", Array) ], Tenant.prototype, "transactions", void 0); __decorate([ HasMany(() => StartTransaction), __metadata("design:type", Array) ], Tenant.prototype, "startTransactions", void 0); __decorate([ HasMany(() => StatusNotification), __metadata("design:type", Array) ], Tenant.prototype, "statusNotifications", void 0); __decorate([ HasMany(() => StopTransaction), __metadata("design:type", Array) ], Tenant.prototype, "stopTransactions", void 0); __decorate([ HasMany(() => LatestStatusNotification), __metadata("design:type", Array) ], Tenant.prototype, "latestStatusNotifications", void 0); __decorate([ HasMany(() => Subscription), __metadata("design:type", Array) ], Tenant.prototype, "subscriptions", void 0); __decorate([ HasMany(() => TransactionEvent), __metadata("design:type", Array) ], Tenant.prototype, "transactionEvents", void 0); __decorate([ HasMany(() => Tariff), __metadata("design:type", Array) ], Tenant.prototype, "tariffs", void 0); __decorate([ HasMany(() => VariableAttribute), __metadata("design:type", Array) ], Tenant.prototype, "variableAttributes", void 0); __decorate([ HasMany(() => VariableCharacteristics), __metadata("design:type", Array) ], Tenant.prototype, "variableCharacteristics", void 0); __decorate([ HasMany(() => VariableMonitoring), __metadata("design:type", Array) ], Tenant.prototype, "variableMonitorings", void 0); __decorate([ HasMany(() => VariableMonitoringStatus), __metadata("design:type", Array) ], Tenant.prototype, "variableMonitoringStatuses", void 0); __decorate([ HasMany(() => VariableStatus), __metadata("design:type", Array) ], Tenant.prototype, "variableStatuses", void 0); __decorate([ HasMany(() => Variable), __metadata("design:type", Array) ], Tenant.prototype, "variables", void 0); __decorate([ HasMany(() => LocalListAuthorization), __metadata("design:type", Array) ], Tenant.prototype, "localListAuthorizations", void 0); __decorate([ HasMany(() => LocalListVersion), __metadata("design:type", Array) ], Tenant.prototype, "localListVersions", void 0); __decorate([ HasMany(() => LocalListVersionAuthorization), __metadata("design:type", Array) ], Tenant.prototype, "localListVersionAuthorizations", void 0); __decorate([ HasMany(() => SendLocalList), __metadata("design:type", Array) ], Tenant.prototype, "sendLocalLists", void 0); __decorate([ HasMany(() => SendLocalListAuthorization), __metadata("design:type", Array) ], Tenant.prototype, "sendLocalListAuthorizations", void 0); Tenant = __decorate([ Table ], Tenant); export { Tenant }; //# sourceMappingURL=Tenant.js.map