Subversion Repositories SmartDukaan

Rev

Rev 23786 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="fofo.stock_allocation")
public class StockAllocation implements Serializable{

        private static final long serialVersionUID = 1L;

        
        @Id
        @Column(name = "fofo_id")
        private int fofoId;
        
        @Id
        @Column(name = "item_id")
        private int itemId;

        @Column(name = "create_timestamp")
        private LocalDateTime createTimestamp = LocalDateTime.now();
        
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + fofoId;
                result = prime * result + itemId;
                return result;
        }



        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                StockAllocation other = (StockAllocation) obj;
                if (fofoId != other.fofoId)
                        return false;
                if (itemId != other.itemId)
                        return false;
                return true;
        }



        public int getFofoId() {
                return fofoId;
        }



        public void setFofoId(int fofoId) {
                this.fofoId = fofoId;
        }



        @Column(name = "update_timestamp")
        private LocalDateTime updateTimestamp = LocalDateTime.now();

        public LocalDateTime getUpdateTimestamp() {
                return updateTimestamp;
        }



        public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
                this.updateTimestamp = updateTimestamp;
        }



        @Column(name = "active")
        private boolean active;

        @Column(name = "quantity")
        private int quantity;
        
        

        public int getQuantity() {
                return quantity;
        }



        public void setQuantity(int quantity) {
                this.quantity = quantity;
        }



        public int getItemId() {
                return itemId;
        }



        public void setItemId(int itemId) {
                this.itemId = itemId;
        }



        public LocalDateTime getCreateTimestamp() {
                return createTimestamp;
        }



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



        public boolean isActive() {
                return active;
        }



        public void setActive(boolean active) {
                this.active = active;
        }


        @Override
        public String toString() {
                return "StockAllocation [fofoId=" + fofoId + ", itemId=" + itemId + ", createTimestamp=" + createTimestamp
                                + ", updateTimestamp=" + updateTimestamp + ", active=" + active + ", quantity=" + quantity + "]";
        }
        
        
}