package com.casic.missiles.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author lwh123
 * @since 2020-03-20
 */
@TableName("bus_group")
@Data
public class Group extends Model<Group> {

    private static final long serialVersionUID = 1L;

    /**
     *  主键
     */
    @TableId(value = "ID",type = IdType.ID_WORKER)
    private Long id;
    /**
     * 分组名称
     */
    @TableField("GROUP_NAME")
    private String groupName;
    /**
     * 告警是否开启，1开启，0关闭
     */
    @TableField("ALARM_OPEN")
    private String alarmOpen;
    /**
     * 部门
     */
    @TableField("DEPTID")
    private Long deptid;
    /**
     * 更新时间
     */
    @TableField("TS")
    private Date ts;

    @TableField(exist = false)
    private String wellNameList;
    @TableField(exist = false)
    private String userNameList;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Group{" +
        "id=" + id +
        ", groupName=" + groupName +
        ", alarmOpen=" + alarmOpen +
        ", deptid=" + deptid +
        ", ts=" + ts +
        "}";
    }
}
