feat: 支持 push
This commit is contained in:
45
src/push-notifications/push-notifications.module.ts
Normal file
45
src/push-notifications/push-notifications.module.ts
Normal 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 { }
|
||||
Reference in New Issue
Block a user