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

export interface QueryFilter {
    search?: string;
    companyId?: string;
    [key: string]: unknown;
  }

export interface ActivityPoint {
  activityId: string;
  points: number;
}

export interface ILeadScoreConfigBase {
  companyId: Types.ObjectId | string;
  activityPoints: ActivityPoint[];
  zeroScoreIfLeadLost: boolean;
  fullScoreIfLeadWon:  boolean;
}

export interface ILeadScoreConfig extends ILeadScoreConfigBase, AuditFields {}

export interface ILeadScoreConfigDoc extends ILeadScoreConfig, Document {}

export interface ILeadScoreConfigModel
  extends IPaginateModel<ILeadScoreConfigDoc> {}

export type NewCreatedLeadScoreConfig = ILeadScoreConfigBase &
  Partial<Pick<AuditFields, 'createdBy' | 'updatedBy'>>;

export type UpdateLeadScoreConfigBody = Partial<ILeadScoreConfig>;