feat: lafgpt。openapi schema

This commit is contained in:
archer
2023-04-06 15:25:48 +08:00
parent 8a02b3b04a
commit f88c6031f5
6 changed files with 85 additions and 54 deletions

View File

@@ -15,7 +15,7 @@ export const pushChatBill = async ({
isPay: boolean;
modelName: string;
userId: string;
chatId: string;
chatId?: string;
text: string;
}) => {
let billId;

View File

@@ -0,0 +1,20 @@
import { Schema, model, models, Model } from 'mongoose';
import { OpenApiSchema } from '@/types/mongoSchema';
const OpenApiSchema = new Schema({
userId: {
type: Schema.Types.ObjectId,
ref: 'user',
required: true
},
createTime: {
type: Date,
default: () => new Date()
},
lastUsedTime: {
type: Date,
default: () => new Date()
}
});
export const OpenApi: Model<OpenApiSchema> = models['openapi'] || model('openapi', OpenApiSchema);