Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.cs;

import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Objects;

@Entity
@Table(name = "cs.rbm_break_log")
public class RbmBreakLog {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "auth_id")
    private int authId;

    @Column(name = "agent_name")
    private String agentName;

    @Column(name = "sr_number")
    private String srNumber;

    @Column(name = "status")
    private String status;

    @Column(name = "log_time")
    private LocalDateTime logTime;

    @Column(name = "duration_seconds")
    private int durationSeconds;

    @Column(name = "duration_display")
    private String durationDisplay;

    @Column(name = "log_date")
    private LocalDate logDate;

    @Column(name = "create_timestamp")
    private LocalDateTime createTimestamp;

    public RbmBreakLog() {
    }

    public RbmBreakLog(int authId, String agentName, String srNumber, String status,
                       LocalDateTime logTime, int durationSeconds, String durationDisplay, LocalDate logDate) {
        this.authId = authId;
        this.agentName = agentName;
        this.srNumber = srNumber;
        this.status = status;
        this.logTime = logTime;
        this.durationSeconds = durationSeconds;
        this.durationDisplay = durationDisplay;
        this.logDate = logDate;
        this.createTimestamp = LocalDateTime.now();
    }

    public Long getId() {
        return id;
    }

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

    public int getAuthId() {
        return authId;
    }

    public void setAuthId(int authId) {
        this.authId = authId;
    }

    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    public String getSrNumber() {
        return srNumber;
    }

    public void setSrNumber(String srNumber) {
        this.srNumber = srNumber;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getLogTime() {
        return logTime;
    }

    public void setLogTime(LocalDateTime logTime) {
        this.logTime = logTime;
    }

    public int getDurationSeconds() {
        return durationSeconds;
    }

    public void setDurationSeconds(int durationSeconds) {
        this.durationSeconds = durationSeconds;
    }

    public String getDurationDisplay() {
        return durationDisplay;
    }

    public void setDurationDisplay(String durationDisplay) {
        this.durationDisplay = durationDisplay;
    }

    public LocalDate getLogDate() {
        return logDate;
    }

    public void setLogDate(LocalDate logDate) {
        this.logDate = logDate;
    }

    public LocalDateTime getCreateTimestamp() {
        return createTimestamp;
    }

    public void setCreateTimestamp(LocalDateTime createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RbmBreakLog that = (RbmBreakLog) o;
        return authId == that.authId &&
                durationSeconds == that.durationSeconds &&
                Objects.equals(id, that.id) &&
                Objects.equals(agentName, that.agentName) &&
                Objects.equals(srNumber, that.srNumber) &&
                Objects.equals(status, that.status) &&
                Objects.equals(logTime, that.logTime) &&
                Objects.equals(logDate, that.logDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, authId, agentName, srNumber, status, logTime, durationSeconds, logDate);
    }

    @Override
    public String toString() {
        return "RbmBreakLog{" +
                "id=" + id +
                ", authId=" + authId +
                ", agentName='" + agentName + '\'' +
                ", srNumber='" + srNumber + '\'' +
                ", status='" + status + '\'' +
                ", logTime=" + logTime +
                ", durationSeconds=" + durationSeconds +
                ", durationDisplay='" + durationDisplay + '\'' +
                ", logDate=" + logDate +
                ", createTimestamp=" + createTimestamp +
                '}';
    }
}