This commit is contained in:
Archer
2023-12-11 15:12:14 +08:00
committed by GitHub
parent 84cf6b5658
commit d2d7eac9e0
105 changed files with 1091 additions and 801 deletions

View File

@@ -8,6 +8,10 @@ const ImageSchema = new Schema({
ref: TeamCollectionName,
required: true
},
createTime: {
type: Date,
default: () => new Date()
},
binary: {
type: Buffer
},
@@ -25,7 +29,10 @@ try {
console.log(error);
}
export const MongoImage: Model<{ teamId: string; binary: Buffer; metadata?: Record<string, any> }> =
models['image'] || model('image', ImageSchema);
export const MongoImage: Model<{
teamId: string;
binary: Buffer;
metadata?: { fileId?: string };
}> = models['image'] || model('image', ImageSchema);
MongoImage.syncIndexes();