UNPKG

@tomei/rental

Version:
47 lines (46 loc) 2.2 kB
import { ObjectBase } from '@tomei/general'; import { BookingStatusEnum } from '../../enum/booking.enum'; import { IBookingAttr } from '../../interfaces/booking-attr.interface'; import { BookingRepository } from './booking.repository'; import { LoginUser } from '@tomei/sso'; import { RentalPrice } from '../rental-price/rental-price'; import { WhereOptions } from 'sequelize'; import { IBookingFindAllSearchAttr } from '../../interfaces/booking-find-all-search-attr.interface'; export declare class Booking extends ObjectBase { ObjectId: string; ObjectName: string; ObjectType: string; TableName: string; CustomerId: string; CustomerType: string; ItemId: string; ItemType: string; PriceId: string; protected _ScheduledStartDateTime: Date; protected _ScheduledEndDateTime: Date; BookingFee: number; Status: BookingStatusEnum; CancelRemarks: string; protected _CreatedById: string; protected _CreatedAt: Date; protected _UpdatedById: string; protected _UpdatedAt: Date; protected static _Repo: BookingRepository; get BookingNo(): string; set BookingNo(value: string); get CreatedById(): string; get CreatedAt(): Date; get UpdatedById(): string; get UpdatedAt(): Date; get ScheduledStartDateTime(): Date; get ScheduledEndDateTime(): Date; setScheduledStartDateTime(datetime: Date): Promise<void>; setScheduledEndDateTime(datetime: Date): Promise<void>; protected constructor(bookingAttr?: IBookingAttr); static init(dbTransaction?: any, bookingNo?: string): Promise<Booking>; create(dbTransaction: any, loginUser: LoginUser, rentalPrice: RentalPrice): Promise<this>; static isBookingItemAvailable(dbTransaction: any, itemId: string, itemType: string, startDateTime: Date, endDateTime: Date): Promise<boolean>; static findAll(dbTransaction: any, page?: number, row?: number, search?: IBookingFindAllSearchAttr): Promise<any>; static findOne(loginUser: LoginUser, dbTransaction: any, searchOptions: WhereOptions): Promise<Booking>; static updateLeadToCustomer(loginUser: LoginUser, dbTransaction: any, LeadId: string, CustomerId: string): Promise<void>; }