UNPKG

@citrineos/data

Version:

The OCPP data module which includes all persistence layer implementation.

96 lines (95 loc) 4.59 kB
import type { ServerProfile, TenantDto } from '@citrineos/base'; import type { Optional } from 'sequelize'; import { Model } 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 declare enum TenantAttributeProps { id = "id", createdAt = "createdAt", updatedAt = "updatedAt" } export interface TenantAttributes { [TenantAttributeProps.id]: string; [TenantAttributeProps.createdAt]: Date; [TenantAttributeProps.updatedAt]: Date; } export interface TenantCreationAttributes extends Optional<TenantAttributes, TenantAttributeProps.createdAt | TenantAttributeProps.updatedAt> { } export declare class Tenant extends Model<TenantAttributes, TenantCreationAttributes> implements TenantDto { static readonly MODEL_NAME: string; id: number; name: string; url?: string | null; partyId?: string | null; countryCode?: string | null; serverProfileOCPI?: ServerProfile | null; isUserTenant: boolean; /** * Relationships */ tenantPartners: TenantPartner[]; authorizations: Authorization[]; boots: Boot[]; certificates: Certificate[]; installedCertificates: InstalledCertificate[]; changeConfigurations: ChangeConfiguration[]; chargingNeeds: ChargingNeeds[]; chargingProfiles: ChargingProfile[]; chargingSchedules: ChargingSchedule[]; chargingStations: ChargingStation[]; chargingStationNetworkProfiles: ChargingStationNetworkProfile[]; chargingStationSecurityInfos: ChargingStationSecurityInfo[]; chargingStationSequences: ChargingStationSequence[]; components: Component[]; componentVariables: ComponentVariable[]; compositeSchedules: CompositeSchedule[]; connectors: Connector[]; evses: EvseType[]; eventDatas: EventData[]; locations: Location[]; meterValues: MeterValue[]; messageInfos: MessageInfo[]; ocppMessages: OCPPMessage[]; reservations: Reservation[]; salesTariffs: SalesTariff[]; securityEvents: SecurityEvent[]; setNetworkProfiles: SetNetworkProfile[]; serverNetworkProfiles: ServerNetworkProfile[]; transactions: Transaction[]; startTransactions: StartTransaction[]; statusNotifications: StatusNotification[]; stopTransactions: StopTransaction[]; latestStatusNotifications: LatestStatusNotification[]; subscriptions: Subscription[]; transactionEvents: TransactionEvent[]; tariffs: Tariff[]; variableAttributes: VariableAttribute[]; variableCharacteristics: VariableCharacteristics[]; variableMonitorings: VariableMonitoring[]; variableMonitoringStatuses: VariableMonitoringStatus[]; variableStatuses: VariableStatus[]; variables: Variable[]; localListAuthorizations: LocalListAuthorization[]; localListVersions: LocalListVersion[]; localListVersionAuthorizations: LocalListVersionAuthorization[]; sendLocalLists: SendLocalList[]; sendLocalListAuthorizations: SendLocalListAuthorization[]; }