mirror of
https://github.com/FranP-code/spend-ia.git
synced 2025-10-13 00:14:09 +00:00
feat: added models
This commit is contained in:
13
packages/server/schemas/currency.ts
Normal file
13
packages/server/schemas/currency.ts
Normal 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);
|
||||
Reference in New Issue
Block a user