import { Document, Types } from 'mongoose';
import { IPaginateModel } from '@/shared/interfaces/model.interface';
import { AuditFields } from '@/shared/types/common';

export interface ILeadStageBase {
  stageName: string;
  description?: string;
  color: string;
  position: number;
  isDefault?: boolean;
  isProtected?: boolean;
  company: Types.ObjectId;
  isActive?: boolean;
}

export interface ILeadStage extends ILeadStageBase, AuditFields {}

export interface ILeadStageDoc extends ILeadStage, Document {}

export interface ILeadStageModel extends IPaginateModel<ILeadStageDoc> {}

export type NewCreatedLeadStage = ILeadStageBase &
  Partial<Pick<AuditFields, 'createdBy'>>;

export type UpdateLeadStageBody = Partial<ILeadStageBase> &
  Partial<Pick<AuditFields, 'updatedBy'>>;