using System;
using System.Collections.Generic;
using CncModels.Dto.Worker;
using CncModels.Dto;

namespace CncService.Interface
{
    public interface IWorkerService
    {
        PagedResult<WorkerListItem> GetList(WorkerQuery query);
        WorkerDetailResponse GetById(int id);
        int Create(CreateWorkerRequest request);
        bool Update(int id, UpdateWorkerRequest request);
        bool Delete(int id);
        int BatchDelete(List<int> ids);
        bool ToggleEnabled(int id);
        bool BindMachine(int workerId, int machineId);
        bool UnbindMachine(int workerId, int machineId);

        /// <summary>
        /// 获取工人绑定机床列表
        /// </summary>
        List<WorkerMachineItem> GetMachines(int workerId);

        /// <summary>
        /// 获取工人今日产量明细
        /// </summary>
        List<WorkerTodayProdItem> GetTodayProduction(int workerId);

        /// <summary>
        /// 获取工人7天产量趋势
        /// </summary>
        List<WorkerTrendItem> GetProductionTrend(int workerId);

        /// <summary>
        /// 获取可绑定机床列表（未绑定其他工人的）
        /// </summary>
        List<WorkerAvailableMachineItem> GetAvailableMachines();
    }
}
