Subversion Repositories SmartDukaan

Rev

Rev 29624 | Rev 31860 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

@Entity
@Table(name = "fofo.scheme_item", schema = "fofo")
public class SchemeItem implements Serializable {

        private static final long serialVersionUID = 1L;

        @Id
        @Column(name = "scheme_id")
        private int schemeId;

        @Id
        @Column(name = "catalog_id")
        private int catalogId;

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

        public int getSchemeId() {
                return schemeId;
        }

        public void setSchemeId(int schemeId) {
                this.schemeId = schemeId;
        }

        @Override
        public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                SchemeItem that = (SchemeItem) o;
                return schemeId == that.schemeId && catalogId == that.catalogId && Objects.equals(createTimestamp, that.createTimestamp);
        }

        @Override
        public String toString() {
                return "SchemeItem{" +
                                "schemeId=" + schemeId +
                                ", catalogId=" + catalogId +
                                ", createTimestamp=" + createTimestamp +
                                '}';
        }

        @Override
        public int hashCode() {
                return Objects.hash(schemeId, catalogId, createTimestamp);
        }

        public LocalDateTime getCreateTimestamp() {
                return createTimestamp;
        }

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

        public int getCatalogId() {
                return catalogId;
        }

        public void setCatalogId(int catalogId) {
                this.catalogId = catalogId;
        }


}