@alisdigital/types-library
Version:
TypeScript type definitions for Papilet ecosystem with session soft delete and event management features
29 lines (28 loc) • 979 B
TypeScript
import { IEventModelAttributes } from "./event.entity";
import { ISessionModelAttributes } from "./session.entity";
import { ITicketModelAttributes } from "./ticket.entity";
import { IUserModelAttributes } from "./user.entity";
export interface IPurchaseModelAttributes {
_id: string;
purchaseNumber: string;
event: string | IEventModelAttributes;
session: string | ISessionModelAttributes;
user: string | IUserModelAttributes;
tickets: string[] | ITicketModelAttributes[];
total: number;
discount: number;
currency: string;
paymentMethod: "creditCard" | "bankTransfer" | "papiletCredit" | "papiletPoint";
paymentStatus: "pending" | "completed" | "failed" | "refunded";
serviceFee: number;
corporateInvoice?: {
companyName: string;
taxNumber: string;
taxOffice: string;
invoiceAddress: string;
};
refundReason?: string;
refundDate?: Date;
createdAt: Date;
updatedAt: Date;
}