add update booking settings API

This commit is contained in:
Mhd Zayd Skaff
2025-07-27 10:22:09 +03:00
parent 331c8dffdc
commit 368e80408d
5 changed files with 109 additions and 2 deletions
@@ -448,6 +448,11 @@ export class ControllerRoute {
public static readonly UPDATE_NAME_DESCRIPTION =
'This endpoint updates the name for a user identified by their UUID.';
public static readonly UPDATE_BOOKING_SETTINGS_SUMMARY =
'Update booking settings by user UUID';
public static readonly UPDATE_BOOKING_SETTINGS_DESCRIPTION =
'This endpoint updates the booking settings for a user identified by their UUID.';
public static readonly DELETE_USER_SUMMARY = 'Delete user by UUID';
public static readonly DELETE_USER_DESCRIPTION =
'This endpoint deletes a user identified by their UUID. Accessible only by users with the Super Admin role.';
@@ -11,6 +11,7 @@ import {
} from 'typeorm';
import { OtpType } from '../../../../src/constants/otp-type.enum';
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
import { BookingEntity } from '../../booking/entities/booking.entity';
import { ClientEntity } from '../../client/entities';
import {
DeviceNotificationEntity,
@@ -29,7 +30,6 @@ import {
UserOtpDto,
UserSpaceDto,
} from '../dtos';
import { BookingEntity } from '../../booking/entities/booking.entity';
@Entity({ name: 'user' })
export class UserEntity extends AbstractEntity<UserDto> {
@@ -101,6 +101,9 @@ export class UserEntity extends AbstractEntity<UserDto> {
@Column({ type: 'timestamp', nullable: true })
appAgreementAcceptedAt: Date;
@Column({ type: Boolean, default: false })
bookingEnabled: boolean;
@OneToMany(() => UserSpaceEntity, (userSpace) => userSpace.user, {
onDelete: 'CASCADE',
})