package jnpf.model.cultivate.dto.teaching;

import com.alibaba.excel.util.StringUtils;
import jnpf.base.Pagination;
import lombok.*;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TeachingBaseFilter extends Pagination {

    /** 门店id集合 */
    private List<String> storeIdList;

    /** 关键字 */
    private String keyword;

    /** 开始日期(yyyy-MM-dd) */
    private String startDate;

    /** 结束日期(yyyy-MM-dd) */
    private String endDate;

    /** 技能点分类id */
    private String categoryId;

    public void dateTimeFormat() {
        if(StringUtils.isNotBlank(this.getStartDate())){
            this.startDate = this.getStartDate() + " 00:00:00";
        }
        if(StringUtils.isNotBlank(this.getEndDate())){
            this.endDate = this.getEndDate() + " 23:59:59";
        }
    }
}