package com.muyu.warn.domain.Resp;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.muyu.common.core.annotation.Excel;
import com.muyu.warn.domain.WarnRule;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName StrategyRuleList
 * @Description 描述
 * @Author YiBo.Liu
 * @Date 2024/9/22 15:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Tag(name = "策略规则一对多")
public class StrategyRuleList {


    /** 策略id */
    @TableId( type = IdType.AUTO)
    private Long id;

    /** 车辆类型id */
    @Excel(name = "车辆类型id")
    private Long carTypeId;

    /** 策略名称 */
    @Excel(name = "策略名称")
    private String strategyName;

    /** 报文模版id */
    @Excel(name = "报文模版id")
    private Long msgId;

    private List<WarnRule> warnRuleList;

//    private static StrategyRuleList strategyRuleList
//            (WarnStrategy warnStrategy, Supplier<Long> supplierId) {
//        return StrategyRuleList.builder()
//                .id(warnStrategy.getId())
//                .carTypeId(warnStrategy.getCarTypeId())
//                .strategyName(warnStrategy.getStrategyName())
//                .msgId(warnStrategy.getMsgId())
//                .warnRuleList(supplierId)
//                .build();
//    }

}
