/** * Tracks which Go imports are required based on the types and features used. */ export interface GoImports { /** Whether the "time" package is needed (for DateTime fields). */ time: boolean; /** Whether the "github.com/google/uuid" package is needed (for UUID defaults). */ uuid: boolean; /** Whether "entgo.io/ent/schema/field" is needed (always true if there are fields). */ field: boolean; /** Whether "entgo.io/ent/schema/edge" is needed (always true if there are edges). */ edge: boolean; /** Whether "entgo.io/ent/schema/index" is needed (for indexes). */ index: boolean; /** Whether "entgo.io/ent/schema" is needed (for Annotations). */ schema: boolean; /** Whether "entgo.io/ent/dialect/entsql" is needed (for table name annotations). */ entsql: boolean; } /** * Create an empty Go imports tracker. */ export declare function createEmptyImports(): GoImports; /** * Map a Prisma scalar type to the corresponding Ent field builder function name. * Returns "String" as a fallback for unknown types. */ export declare function mapPrismaTypeToEnt(prismaType: string): string; /** * Check whether a Prisma scalar type requires the "time" import. */ export declare function requiresTimeImport(prismaType: string): boolean; /** * Build the Go import block string from tracked imports. */ export declare function buildImportBlock(imports: GoImports): string; /** * Check whether a field's native type indicates a UUID. * Prisma encodes `@db.Uuid` as `['Uuid', []]`. */ export declare function isUuidNativeType(nativeType?: readonly [string, readonly string[]] | null): boolean; /** * Check whether a field's native type indicates a Text column. * Prisma encodes `@db.Text` as `['Text', []]`. */ export declare function isTextNativeType(nativeType?: readonly [string, readonly string[]] | null): boolean; /** * Extract MaxLen from a native type like VarChar(N) or Char(N). * Returns the length as a number, or null if not applicable. */ export declare function extractMaxLen(nativeType?: readonly [string, readonly string[]] | null): number | null; //# sourceMappingURL=type-map.d.ts.map