import { Document, Schema, Types } from 'mongoose'; export interface TransferSchema extends Document { date: string; operation: 'in' | 'out'; accountId: string; contractorId: string; amount: number; } export const transferSchema = new Schema({ date: { type: Date, required: true, }, operation: { type: String, required: true, }, accountId: { type: Types.ObjectId, required: true, }, contractorId: { type: Types.ObjectId, required: true, }, amount: { type: Number, required: true, }, }, { timestamps: true });