mirror of
https://github.com/certd/certd.git
synced 2026-07-30 01:07:38 +08:00
26 lines
595 B
TypeScript
26 lines
595 B
TypeScript
|
|
import {Inject, Provide, Scope, ScopeEnum} from '@midwayjs/core';
|
||
|
|
import {InjectEntityModel} from '@midwayjs/typeorm';
|
||
|
|
import {Repository} from 'typeorm';
|
||
|
|
import {AccessService, BaseService} from '@certd/lib-server';
|
||
|
|
import {DomainEntity} from '../entity/domain.js';
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
@Provide()
|
||
|
|
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||
|
|
export class DomainService extends BaseService<DomainEntity> {
|
||
|
|
@InjectEntityModel(DomainEntity)
|
||
|
|
repository: Repository<DomainEntity>;
|
||
|
|
|
||
|
|
@Inject()
|
||
|
|
accessService: AccessService;
|
||
|
|
|
||
|
|
//@ts-ignore
|
||
|
|
getRepository() {
|
||
|
|
return this.repository;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|