feat: lafgpt。openapi schema
This commit is contained in:
@@ -15,7 +15,7 @@ export const pushChatBill = async ({
|
||||
isPay: boolean;
|
||||
modelName: string;
|
||||
userId: string;
|
||||
chatId: string;
|
||||
chatId?: string;
|
||||
text: string;
|
||||
}) => {
|
||||
let billId;
|
||||
|
||||
20
src/service/models/openapi.ts
Normal file
20
src/service/models/openapi.ts
Normal 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);
|
||||
Reference in New Issue
Block a user