/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.erp.domain.tables.pojos;


import cn.vertxup.erp.domain.tables.interfaces.ITOaTraining;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;

import java.time.LocalDateTime;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TOaTraining implements VertxPojo, ITOaTraining {

    private static final long serialVersionUID = 1L;

    private String key;
    private String commentExtension;
    private LocalDateTime startAt;
    private LocalDateTime endAt;
    private String trainLocation;
    private String trainMode;
    private String leader;
    private String leaderComment;
    private String reviewer;
    private String reviewerComment;

    public TOaTraining() {}

    public TOaTraining(ITOaTraining value) {
        this.key = value.getKey();
        this.commentExtension = value.getCommentExtension();
        this.startAt = value.getStartAt();
        this.endAt = value.getEndAt();
        this.trainLocation = value.getTrainLocation();
        this.trainMode = value.getTrainMode();
        this.leader = value.getLeader();
        this.leaderComment = value.getLeaderComment();
        this.reviewer = value.getReviewer();
        this.reviewerComment = value.getReviewerComment();
    }

    public TOaTraining(
        String key,
        String commentExtension,
        LocalDateTime startAt,
        LocalDateTime endAt,
        String trainLocation,
        String trainMode,
        String leader,
        String leaderComment,
        String reviewer,
        String reviewerComment
    ) {
        this.key = key;
        this.commentExtension = commentExtension;
        this.startAt = startAt;
        this.endAt = endAt;
        this.trainLocation = trainLocation;
        this.trainMode = trainMode;
        this.leader = leader;
        this.leaderComment = leaderComment;
        this.reviewer = reviewer;
        this.reviewerComment = reviewerComment;
    }

        public TOaTraining(io.vertx.core.json.JsonObject json) {
                this();
                fromJson(json);
        }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.KEY</code>. 「key」- Ticket
     * Primary Key
     */
    @Override
    public String getKey() {
        return this.key;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.KEY</code>. 「key」- Ticket
     * Primary Key
     */
    @Override
    public TOaTraining setKey(String key) {
        this.key = key;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.COMMENT_EXTENSION</code>.
     * 「commentExtension」- Extension Comment
     */
    @Override
    public String getCommentExtension() {
        return this.commentExtension;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.COMMENT_EXTENSION</code>.
     * 「commentExtension」- Extension Comment
     */
    @Override
    public TOaTraining setCommentExtension(String commentExtension) {
        this.commentExtension = commentExtension;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.START_AT</code>. 「startAt」-
     * From
     */
    @Override
    public LocalDateTime getStartAt() {
        return this.startAt;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.START_AT</code>. 「startAt」-
     * From
     */
    @Override
    public TOaTraining setStartAt(LocalDateTime startAt) {
        this.startAt = startAt;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.END_AT</code>. 「endAt」- To
     */
    @Override
    public LocalDateTime getEndAt() {
        return this.endAt;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.END_AT</code>. 「endAt」- To
     */
    @Override
    public TOaTraining setEndAt(LocalDateTime endAt) {
        this.endAt = endAt;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.TRAIN_LOCATION</code>.
     * 「trainLocation」- The location for training
     */
    @Override
    public String getTrainLocation() {
        return this.trainLocation;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.TRAIN_LOCATION</code>.
     * 「trainLocation」- The location for training
     */
    @Override
    public TOaTraining setTrainLocation(String trainLocation) {
        this.trainLocation = trainLocation;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.TRAIN_MODE</code>. 「trainMode」-
     * The mode of training
     */
    @Override
    public String getTrainMode() {
        return this.trainMode;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.TRAIN_MODE</code>. 「trainMode」-
     * The mode of training
     */
    @Override
    public TOaTraining setTrainMode(String trainMode) {
        this.trainMode = trainMode;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.LEADER</code>. 「leader」- The
     * training leader
     */
    @Override
    public String getLeader() {
        return this.leader;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.LEADER</code>. 「leader」- The
     * training leader
     */
    @Override
    public TOaTraining setLeader(String leader) {
        this.leader = leader;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.LEADER_COMMENT</code>.
     * 「leaderComment」- Comment from leader
     */
    @Override
    public String getLeaderComment() {
        return this.leaderComment;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.LEADER_COMMENT</code>.
     * 「leaderComment」- Comment from leader
     */
    @Override
    public TOaTraining setLeaderComment(String leaderComment) {
        this.leaderComment = leaderComment;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.REVIEWER</code>. 「reviewer」-
     * The training reviewer
     */
    @Override
    public String getReviewer() {
        return this.reviewer;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.REVIEWER</code>. 「reviewer」-
     * The training reviewer
     */
    @Override
    public TOaTraining setReviewer(String reviewer) {
        this.reviewer = reviewer;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.T_OA_TRAINING.REVIEWER_COMMENT</code>.
     * 「reviewerComment」- Comment from reviewer
     */
    @Override
    public String getReviewerComment() {
        return this.reviewerComment;
    }

    /**
     * Setter for <code>DB_ETERNAL.T_OA_TRAINING.REVIEWER_COMMENT</code>.
     * 「reviewerComment」- Comment from reviewer
     */
    @Override
    public TOaTraining setReviewerComment(String reviewerComment) {
        this.reviewerComment = reviewerComment;
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final TOaTraining other = (TOaTraining) obj;
        if (this.key == null) {
            if (other.key != null)
                return false;
        }
        else if (!this.key.equals(other.key))
            return false;
        if (this.commentExtension == null) {
            if (other.commentExtension != null)
                return false;
        }
        else if (!this.commentExtension.equals(other.commentExtension))
            return false;
        if (this.startAt == null) {
            if (other.startAt != null)
                return false;
        }
        else if (!this.startAt.equals(other.startAt))
            return false;
        if (this.endAt == null) {
            if (other.endAt != null)
                return false;
        }
        else if (!this.endAt.equals(other.endAt))
            return false;
        if (this.trainLocation == null) {
            if (other.trainLocation != null)
                return false;
        }
        else if (!this.trainLocation.equals(other.trainLocation))
            return false;
        if (this.trainMode == null) {
            if (other.trainMode != null)
                return false;
        }
        else if (!this.trainMode.equals(other.trainMode))
            return false;
        if (this.leader == null) {
            if (other.leader != null)
                return false;
        }
        else if (!this.leader.equals(other.leader))
            return false;
        if (this.leaderComment == null) {
            if (other.leaderComment != null)
                return false;
        }
        else if (!this.leaderComment.equals(other.leaderComment))
            return false;
        if (this.reviewer == null) {
            if (other.reviewer != null)
                return false;
        }
        else if (!this.reviewer.equals(other.reviewer))
            return false;
        if (this.reviewerComment == null) {
            if (other.reviewerComment != null)
                return false;
        }
        else if (!this.reviewerComment.equals(other.reviewerComment))
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());
        result = prime * result + ((this.commentExtension == null) ? 0 : this.commentExtension.hashCode());
        result = prime * result + ((this.startAt == null) ? 0 : this.startAt.hashCode());
        result = prime * result + ((this.endAt == null) ? 0 : this.endAt.hashCode());
        result = prime * result + ((this.trainLocation == null) ? 0 : this.trainLocation.hashCode());
        result = prime * result + ((this.trainMode == null) ? 0 : this.trainMode.hashCode());
        result = prime * result + ((this.leader == null) ? 0 : this.leader.hashCode());
        result = prime * result + ((this.leaderComment == null) ? 0 : this.leaderComment.hashCode());
        result = prime * result + ((this.reviewer == null) ? 0 : this.reviewer.hashCode());
        result = prime * result + ((this.reviewerComment == null) ? 0 : this.reviewerComment.hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("TOaTraining (");

        sb.append(key);
        sb.append(", ").append(commentExtension);
        sb.append(", ").append(startAt);
        sb.append(", ").append(endAt);
        sb.append(", ").append(trainLocation);
        sb.append(", ").append(trainMode);
        sb.append(", ").append(leader);
        sb.append(", ").append(leaderComment);
        sb.append(", ").append(reviewer);
        sb.append(", ").append(reviewerComment);

        sb.append(")");
        return sb.toString();
    }

    // -------------------------------------------------------------------------
    // FROM and INTO
    // -------------------------------------------------------------------------

    @Override
    public void from(ITOaTraining from) {
        setKey(from.getKey());
        setCommentExtension(from.getCommentExtension());
        setStartAt(from.getStartAt());
        setEndAt(from.getEndAt());
        setTrainLocation(from.getTrainLocation());
        setTrainMode(from.getTrainMode());
        setLeader(from.getLeader());
        setLeaderComment(from.getLeaderComment());
        setReviewer(from.getReviewer());
        setReviewerComment(from.getReviewerComment());
    }

    @Override
    public <E extends ITOaTraining> E into(E into) {
        into.from(this);
        return into;
    }
}
