import { RelationType } from "../enums/relation_type_enum"; import { EntityEnum, EnumEntityType, EnumToModel, VirtualEntityEnum } from "./entity.utils.interface"; type SourcePath = (keyof T & string) | `${string}.${string}`; export type IRelationConfig = { name: T; relation: RelationType; key: keyof EnumToModel; mapKeyConfig: { relationKey: SourcePath>; key: keyof EnumEntityType; }; }; export type RelationConfigs = { [K in keyof T]: T[K] extends EntityEnum | VirtualEntityEnum ? IRelationConfig : never; }; export {};