awaiting_payment

This commit is contained in:
2026-06-29 15:46:24 +03:30
parent bb5f2ef2b3
commit 2eb6718bf4
9 changed files with 536 additions and 9 deletions
+11
View File
@@ -14,6 +14,7 @@ import { UserEntity } from './user.entity';
export enum BookingStatus {
PENDING = 'pending',
AWAITING_PAYMENT = 'awaiting_payment',
CONFIRMED = 'confirmed',
CANCELLED = 'cancelled',
COMPLETED = 'completed',
@@ -69,6 +70,16 @@ export class BookingEntity {
@Column({ type: 'text', nullable: true })
cancellationReason!: string | null;
/** Shared token for paying a booking group (or single booking). */
@Column({ type: 'varchar', nullable: true, length: 64 })
paymentToken!: string | null;
@Column({ type: 'decimal', precision: 12, scale: 0, nullable: true })
paymentAmount!: string | null;
@Column({ type: 'varchar', nullable: true, length: 64 })
paymentAuthority!: string | null;
@CreateDateColumn()
createdAt!: Date;
+4
View File
@@ -58,6 +58,10 @@ export class BusinessEntity {
@Column({ type: 'int', default: 30 })
slotStepMinutes!: number;
/** When true, new bookings skip manual owner approval and go straight to payment. */
@Column({ default: false })
autoApproveBookings!: boolean;
@ManyToOne(() => BusinessCategoryEntity, (category) => category.businesses, {
onDelete: 'RESTRICT',
})