package ink.wgink.login.base.pojo.vos.login;

import ink.wgink.annotation.CheckEmptyAnnotation;
import ink.wgink.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: LoginFormVO
 * @Description: 登录form表单
 * @Author: wanggeng
 * @Date: 2021/7/29 3:47 下午
 * @Version: 1.0
 */
@ApiModel
public class LoginFormVO {

    @ApiModelProperty(name = "name", value = "名称")
    @CheckEmptyAnnotation(name = "名称")
    private String name;
    @ApiModelProperty(name = "summary", value = "说明")
    private String summary;
    @ApiModelProperty(name = "isActive", value = "是否激活")
    @CheckNumberAnnotation(name = "是否激活", types = {"0", "1"})
    private Integer isActive;
    @ApiModelProperty(name = "preview", value = "预览")
    private String preview;
    @ApiModelProperty(name = "resourceImgs", value = "资源图片")
    private String resourceImgs;
    @ApiModelProperty(name = "formHtml", value = "form代码")
    @CheckEmptyAnnotation(name = "form代码")
    private String formHtml;
    @ApiModelProperty(name = "formCss", value = "form样式")
    private String formCss;
    @ApiModelProperty(name = "formLeftCss", value = "form左样式")
    private String formLeftCss;
    @ApiModelProperty(name = "formCenterCss", value = "form中样式")
    private String formCenterCss;
    @ApiModelProperty(name = "formRightCss", value = "form右样式")
    private String formRightCss;

    public String getName() {
        return name == null ? "" : name.trim();
    }

    public void setName(String name) {
        this.name = name;
    }

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

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

    public Integer getIsActive() {
        return isActive == null ? 0 : isActive;
    }

    public void setIsActive(Integer isActive) {
        this.isActive = isActive;
    }

    public String getPreview() {
        return preview == null ? "" : preview.trim();
    }

    public void setPreview(String preview) {
        this.preview = preview;
    }

    public String getResourceImgs() {
        return resourceImgs == null ? "" : resourceImgs.trim();
    }

    public void setResourceImgs(String resourceImgs) {
        this.resourceImgs = resourceImgs;
    }

    public String getFormHtml() {
        return formHtml == null ? "" : formHtml.trim();
    }

    public void setFormHtml(String formHtml) {
        this.formHtml = formHtml;
    }

    public String getFormCss() {
        return formCss == null ? "" : formCss.trim();
    }

    public void setFormCss(String formCss) {
        this.formCss = formCss;
    }

    public String getFormLeftCss() {
        return formLeftCss == null ? "" : formLeftCss.trim();
    }

    public void setFormLeftCss(String formLeftCss) {
        this.formLeftCss = formLeftCss;
    }

    public String getFormCenterCss() {
        return formCenterCss == null ? "" : formCenterCss.trim();
    }

    public void setFormCenterCss(String formCenterCss) {
        this.formCenterCss = formCenterCss;
    }

    public String getFormRightCss() {
        return formRightCss == null ? "" : formRightCss.trim();
    }

    public void setFormRightCss(String formRightCss) {
        this.formRightCss = formRightCss;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"name\":\"")
                .append(name).append('\"');
        sb.append(",\"summary\":\"")
                .append(summary).append('\"');
        sb.append(",\"isActive\":")
                .append(isActive);
        sb.append(",\"preview\":\"")
                .append(preview).append('\"');
        sb.append(",\"resourceImgs\":\"")
                .append(resourceImgs).append('\"');
        sb.append(",\"formHtml\":\"")
                .append(formHtml).append('\"');
        sb.append(",\"formCss\":\"")
                .append(formCss).append('\"');
        sb.append(",\"formLeftCss\":\"")
                .append(formLeftCss).append('\"');
        sb.append(",\"formCenterCss\":\"")
                .append(formCenterCss).append('\"');
        sb.append(",\"formRightCss\":\"")
                .append(formRightCss).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
