package com.crunii.micro.domain.entitysql.main;

import com.crunii.micro.domain.common.jdbc.dto.AbsSetProps;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@Entity
@Table(name = "t_sql_log")
@DynamicInsert
@DynamicUpdate
@Getter
@ToString
@EqualsAndHashCode(of = { "id" })
@ApiModel(description = "sql日志表")
public class TSqlLogS extends AbsSetProps {

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@ApiModelProperty(value = "主键")
	private long id;

	@Column(name = "call_serial")
	@ApiModelProperty(value = "调用批次")
	private String callSerial;

	@Column(name = "call_url")
	@ApiModelProperty(value = "调用url")
	private String callUrl;

	@Column(name = "login_id")
	@ApiModelProperty(value = "登录id")
	private int loginId;

	@Column(name = "login_code")
	@ApiModelProperty(value = "登录工号")
	private String loginCode;

	@Column(name = "worker_name")
	@ApiModelProperty(value = "员工姓名")
	private String workerName;

	@Column(name = "exec_sql")
	@ApiModelProperty(value = "执行sql")
	private String execSql;

	@Column(name = "exec_param")
	@ApiModelProperty(value = "执行的参数")
	private String execParam;

	@Column(name = "exec_param_type")
	@ApiModelProperty(value = "执行sql")
	private String execParamType;

	@Column(name = "create_time")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

	public void setId(long id) {
		this.id = id;
	}

	public void setCallSerial(String callSerial) {
		this.callSerial = callSerial;
		fireSet("callSerial", callSerial);
	}

	public void setCallUrl(String callUrl) {
		this.callUrl = callUrl;
		fireSet("callUrl", callUrl);
	}

	public void setLoginId(int loginId) {
		this.loginId = loginId;
		fireSet("loginId", loginId);
	}

	public void setLoginCode(String loginCode) {
		this.loginCode = loginCode;
		fireSet("loginCode", loginCode);
	}

	public void setWorkerName(String workerName) {
		this.workerName = workerName;
		fireSet("workerName", workerName);
	}

	public void setExecSql(String execSql) {
		this.execSql = execSql;
		fireSet("execSql", execSql);
	}

	public void setExecParam(String execParam) {
		this.execParam = execParam;
		fireSet("execParam", execParam);
	}

	public void setExecParamType(String execParamType) {
		this.execParamType = execParamType;
		fireSet("execParamType", execParamType);
	}

	public void setCreateTime(java.util.Date createTime) {
		this.createTime = createTime;
		fireSet("createTime", createTime);
	}

}
