Subversion Repositories SmartDukaan

Rev

Rev 29222 | 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.logistics;

import in.shop2020.logistics.PickUpType;

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

/**
 * This class basically contains address details
 *
 * @author ashikali
 */
@Entity
@Table(name = "logistics.provider", schema = "logistics")
public class Provider implements Serializable {

        private static final long serialVersionUID = 1L;

        public Provider() {
        }

        @Id
        @Column(name = "id", unique = true, updatable = false)
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;

        @Column(name = "name", length = 100)
        private String name;

        @Column(name = "isActive", columnDefinition = "tinyint(1) default 1")
        private boolean active;

        @Column(name = "pickup")
        @Enumerated(EnumType.ORDINAL)
        private PickUpType pickupType;

        @Column(name = "bundleWeightLimit")
        private float bundleWeightLimit;

        @Column(name = "groupShipmentAllowed", columnDefinition = "tinyint(1) default 0")
        private boolean groupShipmentAllowed;

        @Column(name = "maxCodLimit")
        private float maxCODLimit;


        public int getId() {
                return id;
        }

        public void setId(int id) {
                this.id = id;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public boolean isActive() {
                return active;
        }

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

        public PickUpType getPickupType() {
                return pickupType;
        }

        public void setPickupType(PickUpType pickUpType) {
                this.pickupType = pickUpType;
        }

        public float getBundleWeightLimit() {
                return bundleWeightLimit;
        }

        public void setBundleWeightLimit(float bundleWeightLimit) {
                this.bundleWeightLimit = bundleWeightLimit;
        }

        public boolean isGroupShipmentAllowed() {
                return groupShipmentAllowed;
        }

        public void setGroupShipmentAllowed(boolean groupShipmentAllowed) {
                this.groupShipmentAllowed = groupShipmentAllowed;
        }

        public float getMaxCODLimit() {
                return maxCODLimit;
        }

        public void setMaxCODLimit(float maxCODLimit) {
                this.maxCODLimit = maxCODLimit;
        }

        @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;
                Provider other = (Provider) obj;
                if (id != other.id)
                        return false;
                return true;
        }

        @Override
        public String toString() {
                return "Provider [id=" + id + ", name=" + name + ", active=" + active + ", pickup=" + pickupType
                                + ", bundleWeightLimit=" + bundleWeightLimit + ", groupShipmentAllowed=" + groupShipmentAllowed
                                + ", maxCODLimit=" + maxCODLimit + "]";
        }


}