app-entity-service-constructor.ts.ftl 952 字节
Newer Older
ibizdev's avatar
ibizdev committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import { ServiceConstructorBase } from '@/ibiz-core/service/service-constructor-base';

/**
 * 应用实体服务
 *
 * @export
 * @class AppEntityServiceConstructor
 * @extends {ServiceConstructorBase}
 */
export class AppEntityServiceConstructor extends ServiceConstructorBase {
<#if app.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??>

    /**
     * 初始化
     *
     * @protected
     * @memberof AppEntityServiceConstructor
     */
    protected init(): void {
<#list app.getAllPSAppDataEntities() as appEntity>
        this.allService.set('${appEntity.getCodeName()?lower_case}', () => import('@/app-core/service/${srffilepath2(appEntity.getCodeName())}/${srffilepath2(appEntity.getCodeName())}-service'));
</#list>
    }
</#if>

}

/**
 * 应用实体服务构造器
 */
export const appEntityServiceConstructor: AppEntityServiceConstructor = new AppEntityServiceConstructor();