Subversion Repositories SmartDukaan

Rev

Rev 23786 | 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.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.spice.profitmandi.common.enumuration.CounterSize;

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

        private static final long serialVersionUID = 1L;

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

        @Id
        @Column(name = "counter_size")
        @Enumerated(EnumType.STRING)
        private CounterSize counterSize;

        @Column(name = "create_timestamp")
        private LocalDateTime createTimestamp = LocalDateTime.now();
        
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + catalogId;
                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 (catalogId != other.catalogId)
                        return false;
                return true;
        }



        @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 getCatalogId() {
                return catalogId;
        }



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

        

        public CounterSize getCounterSize() {
                return counterSize;
        }



        public void setCounterSize(CounterSize counterSize) {
                this.counterSize = counterSize;
        }



        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 [catalogId=" + catalogId + ", createTimestamp=" + createTimestamp
                                + ", updateTimestamp=" + updateTimestamp + ", active=" + active + ", quantity=" + quantity + "]";
        }
        
        
}