gen-jhipster
Version:
VHipster - Spring Boot + Angular/React/Vue in one handy generator
31 lines (30 loc) • 1.83 kB
TypeScript
import type CoreGenerator from '../../base-core/generator.ts';
import type { Entity as ServerEntity } from '../../server/types.ts';
import type { Application as BaseApplicationApplication, Entity as BaseApplicationEntity, Field as BaseApplicationField, PrimaryKey } from '../types.ts';
export declare const entityDefaultConfig: {
pagination: "no";
anyPropertyHasValidation: undefined;
dto: "no";
service: "no";
jpaMetamodelFiltering: boolean;
readOnly: boolean;
embedded: boolean;
fluentMethods: boolean;
readonly fields: never[];
readonly relationships: never[];
};
export default function prepareEntity(entityWithConfig: BaseApplicationEntity, generator: CoreGenerator): BaseApplicationEntity<BaseApplicationField, import("../entity.ts").Relationship>;
export declare function derivedPrimaryKeyProperties(primaryKey: PrimaryKey): void;
export declare function prepareEntityPrimaryKeyForTemplates(this: CoreGenerator | void, { entity: entityWithConfig, enableCompositeId, application, }: {
entity: BaseApplicationEntity;
enableCompositeId?: boolean;
application?: any;
}): BaseApplicationEntity<BaseApplicationField, import("../entity.ts").Relationship>;
/**
* Copy required application config into entity.
* Some entity features are related to the backend instead of the current app.
* This allows to entities files based on the backend features.
*/
export declare function loadRequiredConfigIntoEntity<const E extends Partial<ServerEntity>>(this: CoreGenerator | void, entity: E, config: BaseApplicationApplication<BaseApplicationEntity>): E;
export declare function preparePostEntityCommonDerivedProperties(entity: BaseApplicationEntity): void;
export declare function addFakerToEntity(entityWithConfig: BaseApplicationEntity, nativeLanguage?: string): Promise<void>;