Subversion Repositories SmartDukaan

Rev

Rev 31860 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

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

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * This class basically contains api details
 * 
 * @author ashikali
 *
 */
@Entity
@Table(name="dtr.brands")
public class Brand implements Serializable{
        
        private static final long serialVersionUID = 1L;
        
        public Brand() {
        }
        
        @Id
        @Column(name="id", columnDefinition = "int(10) unsigned")
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;
        
        @Column(name="name")
        private String name;
        
        @Column(name = "category_id")
        private int categoryId;
        
        @Column(name = "displayed_in_preference_page", columnDefinition="tinyint(1) default 0")
        private boolean displayedInPreferencePage;
        
        @Column(name = "created")
        private LocalDateTime createTimestamp;
        
        public int getId() {
                return id;
        }
        public void setId(int id) {
                this.id = id;
        }
        public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    
    public int getCategoryId() {
                return categoryId;
        }
    public void setCategoryId(int categoryId) {
                this.categoryId = categoryId;
        }
    public boolean isDisplayedInPreferencePage() {
                return displayedInPreferencePage;
        }
    public void setDisplayedInPreferencePage(boolean displayedInPreferencePage) {
                this.displayedInPreferencePage = displayedInPreferencePage;
        }
    public LocalDateTime getCreateTimestamp() {
                return createTimestamp;
        }
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
                this.createTimestamp = createTimestamp;
        }
    
        
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + id;
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                Brand other = (Brand) obj;
                if (id != other.id)
                        return false;
                return true;
        }
        @Override
        public String toString() {
                return "Brand [id=" + id + ", name=" + name + ", categoryId=" + categoryId + ", displayedInPreferencePage="
                                + displayedInPreferencePage + ", createTimestamp=" + createTimestamp + "]";
        }
        
    
}