feat: added models

This commit is contained in:
2023-07-04 23:42:50 -03:00
parent fe0cacf145
commit 2d0f960d49
11 changed files with 94 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
import { z } from 'zod';
import { Schema, model } from 'mongoose';
import { type CurrencyType } from '../types';
export const CurrencySchema = z.object({
label: z.string(),
} satisfies CurrencyType);
const schema = new Schema({
label: { required: true, type: String },
} satisfies CurrencyType);
export const Currency = model('Currency', schema);