50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { UserPrivilegeConfigurationEntity } from '../../../entities/user-privilege-configuration.entity';
|
|
import {
|
|
EventTopics,
|
|
validateRelations,
|
|
} from 'src/core/strings/constants/interface.constants';
|
|
import { BaseCustomManager } from 'src/core/modules/domain/usecase/managers/base-custom.manager';
|
|
import { UserPrivilegeConfigurationModel } from 'src/modules/user-related/user-privilege/data/models/user-privilege-configuration.model';
|
|
|
|
@Injectable()
|
|
export class UpdateUserPrivilegeConfigurationManager extends BaseCustomManager<UserPrivilegeConfigurationEntity> {
|
|
async validateProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
async beforeProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
async process(): Promise<void> {
|
|
this.result = await this.dataService.update(
|
|
this.queryRunner,
|
|
this.entityTarget,
|
|
{ id: this.data.id },
|
|
this.data,
|
|
);
|
|
return;
|
|
}
|
|
|
|
async afterProcess(): Promise<void> {
|
|
return;
|
|
}
|
|
|
|
get validateRelations(): validateRelations[] {
|
|
return [];
|
|
}
|
|
|
|
getResult() {
|
|
return this.result;
|
|
}
|
|
|
|
get entityTarget(): any {
|
|
return UserPrivilegeConfigurationModel;
|
|
}
|
|
|
|
get eventTopics(): EventTopics[] {
|
|
return [];
|
|
}
|
|
}
|