in packages/cli/src/generators/prisma.ts [54:80]
function getType({
isBigint,
isOptional,
type,
}: { type: FieldType; isOptional: boolean; isBigint: boolean }) {
if (type === "string") {
return isOptional ? "String?" : "String";
}
if (type === "number" && isBigint) {
return isOptional ? "BigInt?" : "BigInt";
}
if (type === "number") {
return isOptional ? "Int?" : "Int";
}
if (type === "boolean") {
return isOptional ? "Boolean?" : "Boolean";
}
if (type === "date") {
return isOptional ? "DateTime?" : "DateTime";
}
if (type === "string[]") {
return isOptional ? "String[]" : "String[]";
}
if (type === "number[]") {
return isOptional ? "Int[]" : "Int[]";
}
}