@citrineos/data
Version:
The OCPP data module which includes all persistence layer implementation.
32 lines (31 loc) • 1.5 kB
TypeScript
import { MeterValue } from './MeterValue';
import { TransactionEvent } from './TransactionEvent';
import { Evse } from '../DeviceModel';
import { ChargingStation } from '../Location';
import { StartTransaction, StopTransaction } from './';
import { BaseModelWithTenant } from '../BaseModelWithTenant';
export declare class Transaction extends BaseModelWithTenant {
static readonly MODEL_NAME: string;
static readonly TRANSACTION_EVENTS_ALIAS = "transactionEvents";
static readonly TRANSACTION_EVENTS_FILTER_ALIAS = "transactionEventsFilter";
stationId: string;
station: ChargingStation;
evse?: Evse | null;
evseDatabaseId?: number;
transactionId: string;
isActive: boolean;
transactionEvents?: TransactionEvent[];
transactionEventsFilter?: TransactionEvent[];
meterValues?: MeterValue[];
startTransaction?: StartTransaction;
stopTransaction?: StopTransaction;
chargingState?: string | null;
timeSpentCharging?: number | null;
totalKwh?: number | null;
stoppedReason?: string | null;
remoteStartId?: number | null;
totalCost?: number;
customData?: any | null;
static buildTransaction(id: string, // todo temp
stationId: string, transactionId: string, isActive: boolean, transactionEvents: TransactionEvent[], meterValues: MeterValue[], chargingState?: string, timeSpentCharging?: number, totalKwh?: number, stoppedReason?: string, remoteStartId?: number, totalCost?: number, customData?: object): Transaction;
}