import { Schema, model } from 'mongoose';

const payTypeSchema = new Schema(
	{
		iconUrlColor: { type: String, default: '' }, // `AlfaBank.png`
		payType: { type: String, default: '' },
		payTypeProps: [
			{
				exchangeId: { type: String, default: '' },
				payName: { type: String, default: '' },
				payId: { type: String, default: '' },
				switchedOn: { type: Boolean, default: true },
			},
		],
	},
	{
		timestamps: true,
	}
);

// Создание nosql-таблицы payType
export const PayType = model('PayType', payTypeSchema);
