mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
perf: binary avatar
This commit is contained in:
15
client/src/service/models/image.ts
Normal file
15
client/src/service/models/image.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Schema, model, models, Model } from 'mongoose';
|
||||
|
||||
const ImageSchema = new Schema({
|
||||
userId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'user',
|
||||
required: true
|
||||
},
|
||||
binary: {
|
||||
type: Buffer
|
||||
}
|
||||
});
|
||||
|
||||
export const Image: Model<{ userId: string; binary: Buffer }> =
|
||||
models['image'] || model('image', ImageSchema);
|
@@ -68,3 +68,4 @@ export * from './models/shareChat';
|
||||
export * from './models/kb';
|
||||
export * from './models/inform';
|
||||
export * from './models/system';
|
||||
export * from './models/image';
|
||||
|
Reference in New Issue
Block a user