feat: 支持 push

This commit is contained in:
richarjiang
2025-10-11 17:38:04 +08:00
parent 999fc7f793
commit 305a969912
30 changed files with 4582 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
import { Module } from '@nestjs/common';
import { SequelizeModule } from '@nestjs/sequelize';
import { PushNotificationsController } from './push-notifications.controller';
import { PushTemplateController } from './push-template.controller';
import { PushNotificationsService } from './push-notifications.service';
import { ApnsProvider } from './apns.provider';
import { PushTokenService } from './push-token.service';
import { PushTemplateService } from './push-template.service';
import { PushMessageService } from './push-message.service';
import { UserPushToken } from './models/user-push-token.model';
import { PushMessage } from './models/push-message.model';
import { PushTemplate } from './models/push-template.model';
import { ConfigModule } from '@nestjs/config';
import { DatabaseModule } from '../database/database.module';
@Module({
imports: [
ConfigModule,
DatabaseModule,
SequelizeModule.forFeature([
UserPushToken,
PushMessage,
PushTemplate,
]),
],
controllers: [
PushNotificationsController,
PushTemplateController,
],
providers: [
ApnsProvider,
PushNotificationsService,
PushTokenService,
PushTemplateService,
PushMessageService,
],
exports: [
ApnsProvider,
PushNotificationsService,
PushTokenService,
PushTemplateService,
PushMessageService,
],
})
export class PushNotificationsModule { }