package com.dev.swms.server.model.base;

import com.dev.energy.server.model.Entity;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

public class TransSite extends Entity {
	/**
	 * @Description：运输地类型
	 * @author  dev
	 * @Date：2009-2-12
	 */
	private static final long serialVersionUID = 1L;
	private Town town;//所属城市
	private String type;//运输地类型(TransSiteType)：客户仓库、中转仓库、配送站、港口、火车站、汽车站、机场、CDC仓库、RDC仓库、其他
	private String code;//运输地代码
	private String name;//运输地名称
	private double longitude = 0;//经度
	private double latitude = 0;//维度
	private Contact contact;//联系方式
	private boolean disabled = false;//是否失效
	private String description;//描述
	private double spendTime = 0;//运输耗时
	
	public int hashCode() {
		return new HashCodeBuilder().append(code).toHashCode();
	}

	public boolean equals(final Object other) {
		if (!(other instanceof TransSite))
			return false;
		TransSite castOther = (TransSite) other;
		return new EqualsBuilder().append(code, castOther.code).isEquals();
	}

	public Town getTown() {
		return town;
	}

	public void setTown(Town town) {
		this.town = town;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public String getName() {
		return name;
	}

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

	public double getSpendTime() {
		return spendTime;
	}

	public void setSpendTime(double spendTime) {
		this.spendTime = spendTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
