using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Share.Enums.BatchTask;

namespace Hotline.Share.Dtos.BatchTask
{
    public class AddApptaskRequest
    {
        /// <summary>
        /// 任务名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 任务描述
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 任务类型
        /// </summary>
        public ETaskType TaskType { get; set; }

        /// <summary>
        /// 执行次数上限
        /// </summary>
        public int TryLimit { get; set; } = 1;

        /// <summary>
        /// 优先级
        /// 由高到低（0-9）
        /// </summary>
        public int? Priority { get; set; }

        public List<AddApptaskItemRequest> ApptaskItems { get; set; }
    }

    public class AddApptaskItemRequest
    {
        /// <summary>
        /// 业务id（冗余）
        /// </summary>
        public string BusinessId { get; set; }
        
        public object? TaskParams { get; set; }
    }
}
