initial commit
This commit is contained in:
14
models/Image.ts
Normal file
14
models/Image.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import {Schema, Types, model} from 'mongoose';
|
||||
|
||||
export interface Image{
|
||||
_id: Types.ObjectId; // act as random generated filename
|
||||
extension: string;
|
||||
}
|
||||
|
||||
const imageSchema = new Schema<Image>({
|
||||
extension: {type: String, required: true}
|
||||
});
|
||||
|
||||
export const imageModel = model<Image>(
|
||||
'imageModel', imageSchema
|
||||
);
|
||||
Reference in New Issue
Block a user