@alisdigital/types-library
Version:
TypeScript type definitions for Papilet ecosystem with session soft delete and event management features
45 lines (44 loc) • 1.6 kB
TypeScript
import { ICampaignModelAttributes } from "./campaign.entity";
import { ICityModelAttributes } from "./city.entity";
import { IEventModelAttributes } from "./event.entity";
import { IOrganizerModelAttributes } from "./organizer.entity";
import { ISeatGroupModelAttributes } from "./seatGroup.entity";
import { IVenueModelAttributes } from "./venue.entity";
export interface ISessionBlockDefaultModelAttributes {
_id?: string;
price: number;
isSoldOut: boolean;
campaigns: string[] | ICampaignModelAttributes[];
isActive: boolean;
title: string;
}
export interface ISessionBlockSeatModelAttributes extends ISessionBlockDefaultModelAttributes {
type: "SEAT";
seatGroup: string | ISeatGroupModelAttributes;
}
export interface ISessionBlockVipModelAttributes extends ISessionBlockDefaultModelAttributes {
type: "VIP";
capacity: number;
}
export type ISessionBlockModelAttributes = ISessionBlockSeatModelAttributes | ISessionBlockVipModelAttributes;
export interface ISessionModelAttributes {
_id: string;
event: string | IEventModelAttributes;
city: string | ICityModelAttributes;
venue: string | IVenueModelAttributes;
blocks: ISessionBlockModelAttributes[];
organizer: string | IOrganizerModelAttributes;
closeSellDate: Date;
isSoldOut: boolean;
lastSoldDate: Date;
isSellSoon: boolean;
status: "pending" | "approved";
hasSecretSell: boolean;
isDonation: boolean;
isFree: boolean;
hasSeat: boolean;
isDeleted?: boolean;
deletedAt?: Date | null;
createdAt?: Date;
updatedAt?: Date;
}