import { BaseRepositoryPort } from '@humand-packages/common';
import { LimitOffsetPagination } from '../../../../../types/listOptions';
import { ShiftRotation, ShiftRotationForCreation } from '../../../business/models/shiftManagement/shiftRotation';

export interface ShiftRotationsListFilters {
    search?: string;
}

export default abstract class ShiftRotationRepositoryPort extends BaseRepositoryPort {
    abstract create(instanceId: number, forCreation: ShiftRotationForCreation): Promise<ShiftRotation>;
    abstract getById(instanceId: number, id: string): Promise<ShiftRotation | null>;
    abstract list(
        instanceId: number,
        filters: ShiftRotationsListFilters,
        pagination: LimitOffsetPagination,
    ): Promise<{ count: number; rows: ShiftRotation[] }>;

    abstract replaceDays(instanceId: number, existing: ShiftRotation, forCreation: ShiftRotationForCreation): Promise<ShiftRotation>;
    abstract softDelete(instanceId: number, id: string): Promise<boolean>;
}
