package com.post.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Tdownload entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tdownload", catalog = "cwfx")
public class Tdownload implements java.io.Serializable {

	// Fields

	private String cid;
	private Tuser tuser;
	private String cfilename;
	private String cfilepath;
	private Timestamp cuploaddate;
	private Integer ccount;

	// Constructors

	/** default constructor */
	public Tdownload() {
	}

	/** minimal constructor */
	public Tdownload(String cid) {
		this.cid = cid;
	}

	/** full constructor */
	public Tdownload(String cid, Tuser tuser, String cfilename, String cfilepath, Timestamp cuploaddate, Integer ccount) {
		this.cid = cid;
		this.tuser = tuser;
		this.cfilename = cfilename;
		this.cfilepath = cfilepath;
		this.cuploaddate = cuploaddate;
		this.ccount = ccount;
	}

	// Property accessors
	@Id
	@Column(name = "CID", unique = true, nullable = false, length = 36)
	public String getCid() {
		return this.cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CUSERID")
	public Tuser getTuser() {
		return this.tuser;
	}

	public void setTuser(Tuser tuser) {
		this.tuser = tuser;
	}

	@Column(name = "CFILENAME", length = 200)
	public String getCfilename() {
		return this.cfilename;
	}

	public void setCfilename(String cfilename) {
		this.cfilename = cfilename;
	}

	@Column(name = "CFILEPATH", length = 250)
	public String getCfilepath() {
		return this.cfilepath;
	}

	public void setCfilepath(String cfilepath) {
		this.cfilepath = cfilepath;
	}

	@Column(name = "CUPLOADDATE", length = 19)
	public Timestamp getCuploaddate() {
		return this.cuploaddate;
	}

	public void setCuploaddate(Timestamp cuploaddate) {
		this.cuploaddate = cuploaddate;
	}

	@Column(name = "CCOUNT")
	public Integer getCcount() {
		return this.ccount;
	}

	public void setCcount(Integer ccount) {
		this.ccount = ccount;
	}

}