package ink.wgink.gateway.pojo.routetype;

import ink.wgink.gateway.annoation.CheckEmptyAnnotation;
import ink.wgink.gateway.dao.routetype.IRouteTypeDao;
import ink.wgink.gateway.pojo.BasePOJO;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: RouteType
 * @Description: 路由类型
 * @Author: WangGeng
 * @Date: 2021/5/8 12:10
 * @Version: 1.0
 **/
@Document(collection = IRouteTypeDao.COLLECTION_NAME)
public class RouteType extends BasePOJO implements Serializable {

    private static final long serialVersionUID = -4213129156239577757L;
    @CheckEmptyAnnotation(name = "名称")
    private String title;
    @CheckEmptyAnnotation(name = "说明")
    private String summary;

    public String getTitle() {
        return title == null ? "" : title.trim();
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary == null ? "" : summary.trim();
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }
}
