import mongoose, { Schema, Document } from "mongoose";

export interface IEmployee extends Document {
    name: string;
    userId: Schema.Types.ObjectId;
    companyId: Schema.Types.ObjectId;
}

const EmployeeSchema = new Schema<IEmployee>({
    userId: { type: Schema.Types.ObjectId, required: true, ref: "User" },
    companyId: { type: Schema.Types.ObjectId, required: true, ref: "Companie" },
});

export default mongoose.model<IEmployee>("Employee", EmployeeSchema);
