package com.sailmi.sailplat.foundation.domain;
// Generated 2019-3-19 16:57:19 by Hibernate Tools 5.2.11.Final

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TblStorecart generated by hbm2java
 */
@Entity
@Table(name = "tbl_storecart", catalog = "sailplat")
public class TblStorecart implements java.io.Serializable {

	private Long id;
	private TblStore tblStore;
	private TblUser tblUser;
	private Date addTime;
	private boolean deleteStatus;
	private String cartSessionId;
	private BigDecimal totalPrice;
	private Integer scStatus;
	private Set<TblGoodscart> tblGoodscarts = new HashSet<TblGoodscart>(0);

	public TblStorecart() {
	}

	public TblStorecart(boolean deleteStatus) {
		this.deleteStatus = deleteStatus;
	}

	public TblStorecart(TblStore tblStore, TblUser tblUser, Date addTime, boolean deleteStatus, String cartSessionId,
			BigDecimal totalPrice, Integer scStatus, Set<TblGoodscart> tblGoodscarts) {
		this.tblStore = tblStore;
		this.tblUser = tblUser;
		this.addTime = addTime;
		this.deleteStatus = deleteStatus;
		this.cartSessionId = cartSessionId;
		this.totalPrice = totalPrice;
		this.scStatus = scStatus;
		this.tblGoodscarts = tblGoodscarts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public TblStore getTblStore() {
		return this.tblStore;
	}

	public void setTblStore(TblStore tblStore) {
		this.tblStore = tblStore;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public TblUser getTblUser() {
		return this.tblUser;
	}

	public void setTblUser(TblUser tblUser) {
		this.tblUser = tblUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "addTime", length = 19)
	public Date getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	@Column(name = "deleteStatus", nullable = false)
	public boolean isDeleteStatus() {
		return this.deleteStatus;
	}

	public void setDeleteStatus(boolean deleteStatus) {
		this.deleteStatus = deleteStatus;
	}

	@Column(name = "cart_session_id")
	public String getCartSessionId() {
		return this.cartSessionId;
	}

	public void setCartSessionId(String cartSessionId) {
		this.cartSessionId = cartSessionId;
	}

	@Column(name = "total_price")
	public BigDecimal getTotalPrice() {
		return this.totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	@Column(name = "sc_status")
	public Integer getScStatus() {
		return this.scStatus;
	}

	public void setScStatus(Integer scStatus) {
		this.scStatus = scStatus;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tblStorecart")
	public Set<TblGoodscart> getTblGoodscarts() {
		return this.tblGoodscarts;
	}

	public void setTblGoodscarts(Set<TblGoodscart> tblGoodscarts) {
		this.tblGoodscarts = tblGoodscarts;
	}

}
