refactor: changed notif entity and createDTO

This commit is contained in:
2026-08-01 00:20:59 +03:30
parent 13d41ed0ac
commit 366ab5092e
4 changed files with 5 additions and 5 deletions
@@ -27,13 +27,11 @@ export class CreateNotificationDto {
description: 'notification subject'
})
@IsString()
@IsOptional()
subject: string;
@ApiProperty({
description: 'notification message'
})
@IsString()
@IsOptional()
message: string;
}
@@ -6,7 +6,8 @@ import { Column, Entity, ManyToOne } from "typeorm";
@Entity('notifications')
export class AppNotification extends BaseEntity {
@Column({
type: 'boolean'
type: 'boolean',
default: false
})
isRead: boolean;
@@ -9,9 +9,12 @@ import { HttpModule } from '@nestjs/axios';
import { NotificationController } from './notification.controller';
import { NotificationService } from './providers/notification.service';
import { NotificationRepository } from './repositories/notification.repository';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppNotification } from './entities/notification.entity';
@Module({
imports: [
TypeOrmModule.forFeature([AppNotification]),
HttpModule,
BullModule.registerQueue({
name: SMS_QUEUE,
@@ -6,6 +6,4 @@ export class NotificationService {
constructor(
private readonly notifRepository: NotificationRepository
) {}
}