modarb-be / src /common /models /muscle.model.ts
moahmedwafy's picture
feat: create muscle and equiment models
f1528d2
raw
history blame
424 Bytes
import mongoose from "mongoose";
const { Schema } = mongoose;
export interface IMuscle {
name: string;
image: string;
}
const muscleSchema = new Schema({
name: { type: String, required: true, unique: true, dropDups: true },
image: { type: String, required: true },
});
export type MuscleDocument = IMuscle & mongoose.Document;
export const Muscle = mongoose.model<MuscleDocument>(
"muscles",
muscleSchema
);