import { Document, Schema } from 'mongoose'; export interface AccountSchema extends Document { name: string; code: string; balance: number; currency: 'BYN' | 'USD' | 'EUR'; } export const accountSchema = new Schema({ name: { type: String, required: true, }, code: { type: String, required: true, }, balance: { type: Number, default: 0, }, currency: { type: String, default: 'BYN' }, }, { timestamps: true });