pos-be/src/modules/item-related/time-group/domain/usecases/managers/detail-time-group.manager.ts

49 lines
1.2 KiB
TypeScript

import { Injectable } from '@nestjs/common';
import { BaseDetailManager } from 'src/core/modules/domain/usecase/managers/base-detail.manager';
import { TimeGroupEntity } from '../../entities/time-group.entity';
import { RelationParam } from 'src/core/modules/domain/entities/base-filter.entity';
@Injectable()
export class DetailTimeGroupManager extends BaseDetailManager<TimeGroupEntity> {
async prepareData(): Promise<void> {
return;
}
async beforeProcess(): Promise<void> {
return;
}
async afterProcess(): Promise<void> {
return;
}
get relations(): RelationParam {
return {
joinRelations: [],
selectRelations: [],
countRelations: [],
};
}
get selects(): string[] {
return [
`${this.tableName}.id`,
`${this.tableName}.status`,
`${this.tableName}.name`,
`${this.tableName}.start_time`,
`${this.tableName}.end_time`,
`${this.tableName}.max_usage_time`,
`${this.tableName}.created_at`,
`${this.tableName}.creator_name`,
`${this.tableName}.updated_at`,
`${this.tableName}.editor_name`,
];
}
get setFindProperties(): any {
return {
id: this.dataId,
};
}
}