package com.ssj.service.conch.student.dto;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class SmartTimeGroupDTO implements Serializable {

    private static final long serialVersionUID = 5634929628758724705L;

    @JSONField(serialize=false)
    private String smartTimeListStr;
    @JSONField(serialize=false)
    private String groupType;

    public String getKeyword() {
        return groupType;
    }

    public List<String> getSmartTimeList() {
        if (StringUtils.isBlank(smartTimeListStr)) {
            return Collections.emptyList();
        } else {
            return Arrays.asList(smartTimeListStr.split(","));
        }
    }

    public String getSmartTimeListStr() {
        return smartTimeListStr;
    }

    public void setSmartTimeListStr(String smartTimeListStr) {
        this.smartTimeListStr = smartTimeListStr;
    }

    public String getGroupType() {
        return groupType;
    }

    public void setGroupType(String groupType) {
        this.groupType = groupType;
    }
}
