import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Document } from "mongoose";

export type BodyPartDocument = BodyPart & Document;

@Schema({ timestamps: true, strict: true })
export class BodyPart {
  @Prop({ type: Object, required: true })
  name!: Record<string, string>;

  @Prop({ default: 1 })
  status!: number;

  @Prop({ default: null })
  deleted_at!: Date | null;
}

export const BodyPartSchema = SchemaFactory.createForClass(BodyPart);
