All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hecloud.runtime.common.model.SelectBean Maven / Gradle / Ivy

package com.hecloud.runtime.common.model;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 简单实体,用来实现下拉列表数据
 *
 * @author LoveinBJ
 */
@Data
@NoArgsConstructor
public class SelectBean {

    private Long id;
    private String uuid;
    private String name;
    private String value;

    public SelectBean(Long id, String name) {
        super();
        this.id = id;
        this.name = name;
    }

    public SelectBean(Long id, String name, String value) {
        super();
        this.id = id;
        this.name = name;
        this.value = value;
    }

    /**
     * @param uuid  UUID
     * @param name  名称
     * @param value 数值
     */
    public SelectBean(String uuid, String name, String value) {
        this.uuid = uuid;
        this.name = name;
        this.value = value;
    }

    /**
     * @param uuid UUID
     * @param name 名称
     */
    public SelectBean(String uuid, String name) {
        this.uuid = uuid;
        this.name = name;
    }

    public static SelectBean getBean(String name, String value) {
        SelectBean bean = new SelectBean();
        bean.setName(name);
        bean.setValue(value);
        return bean;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy