UNPKG

@citrineos/data

Version:

The OCPP data module which includes all persistence layer implementation.

52 lines (51 loc) 2.14 kB
import type { StartTransactionDto, StopTransactionDto, TenantDto, TransactionDto } from '@citrineos/base'; import { Model } from 'sequelize-typescript'; import { Authorization } from '../Authorization/index.js'; import { Tariff } from '../index.js'; import { type ChargingStation as ChargingStationType } from '../Location/ChargingStation.js'; import { Connector } from '../Location/Connector.js'; import { Evse } from '../Location/Evse.js'; import { type Location as LocationType } from '../Location/Location.js'; import { MeterValue } from './MeterValue.js'; import { TransactionEvent } from './TransactionEvent.js'; export declare class Transaction extends Model implements TransactionDto { static readonly MODEL_NAME: string; static readonly TRANSACTION_EVENTS_ALIAS = "transactionEvents"; static readonly TRANSACTION_EVENTS_FILTER_ALIAS = "transactionEventsFilter"; locationId?: number; location?: LocationType; stationId: string; station: ChargingStationType; evseId?: number; evse?: Evse | null; connectorId?: number; connector?: Connector | null; authorizationId?: number; authorization?: Authorization; tariffId?: number; tariff?: Tariff; transactionId: string; isActive: boolean; transactionEvents?: TransactionEvent[]; transactionEventsFilter?: TransactionEvent[]; meterValues?: MeterValue[]; startTransaction?: StartTransactionDto; stopTransaction?: StopTransactionDto; chargingState?: string | null; timeSpentCharging?: number | null; /** * The starting meter value in kWh at the beginning of the transaction, if available. This is derived from StartTransaction in OCPP 1.6 or the first 'Transaction.Begin' or 'Sample.Periodic' meter value. */ meterStart?: number | null; totalKwh?: number | null; stoppedReason?: string | null; remoteStartId?: number | null; totalCost?: number; startTime?: string; endTime?: string; customData?: any | null; tenantId: number; tenant?: TenantDto; static setDefaultTenant(instance: Transaction): void; constructor(...args: any[]); }