mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-04 15:20:18 +01:00
10 lines
344 B
TypeScript
10 lines
344 B
TypeScript
|
|
import balanceSchema from '~/schema/balance';
|
||
|
|
import type * as t from '~/types';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Balance model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createBalanceModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Balance || mongoose.model<t.IBalance>('Balance', balanceSchema);
|
||
|
|
}
|