mirror of
https://github.com/FranP-code/spend-ia.git
synced 2025-10-13 00:14:09 +00:00
14 lines
354 B
TypeScript
14 lines
354 B
TypeScript
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);
|