single-source-of-truth
Version:
Use Zod schemas to your generate Prisma schema
21 lines • 492 B
JavaScript
import { ZodType } from 'zod/v4';
import { id, unique, updatedAt } from './symbols.js';
ZodType.prototype[id] = function () {
return this.clone({
...this.def,
' id': true,
});
};
ZodType.prototype[unique] = function () {
return this.clone({
...this.def,
' unique': true,
});
};
ZodType.prototype[updatedAt] = function () {
return this.clone({
...this.def,
' updatedAt': true,
});
};
//# sourceMappingURL=prototype.js.map