/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.wechat.model.dbEntity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户券详情Entity
 * @author tangwc
 * @version 2018-09-09
 */
public class MdeTicketDetail extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private String tdId;		// 券ID（自增）
	private String tdCode;		// 券code（13位时间戳装16进制+4位随机字符）
	private String tcCode;		// 券类别code(uuid)
	private Long userCode;		// 当前绑定用户code
	private String userName;	// 用户手机号或邮箱
	private Long shareBy;		// 分享来源
	private String identityFlag;		// 可使用身份标识[0-个人；1-企业]
	private String shareFlag;		// 可分享标识[0-不可分享；1-可分享]
	private Date availableFrom;		// 使用时间from
	private Date availableTo;		// 使用时间to
	private String usedFlag;		// 可使用标识[1-可使用；2-已使用；9-已过期]
	
	private String title;		// 标题
	private String description;		// 使用说明
	private String rule;		// 使用规则
	private String money;		// 券面价格
	
	public MdeTicketDetail() {
		super();
	}

	@Length(min=1, max=11, message="字段长度超过限制|Field length exceeds limit")
	public String getTdId() {
		return tdId;
	}

	public void setTdId(String tdId) {
		this.tdId = tdId;
	}
	
	@Length(min=1, max=20, message="字段长度超过限制|Field length exceeds limit")
	public String getTdCode() {
		return tdCode;
	}

	public void setTdCode(String tdCode) {
		this.tdCode = tdCode;
	}
	
	@Length(min=1, max=255, message="字段长度超过限制|Field length exceeds limit")
	public String getTcCode() {
		return tcCode;
	}

	public void setTcCode(String tcCode) {
		this.tcCode = tcCode;
	}
	
	@NotNull(message="用户code不能为空|User code can not be empty.")
	public Long getUserCode() {
		return userCode;
	}

	public void setUserCode(Long userCode) {
		this.userCode = userCode;
	}
	
	public Long getShareBy() {
		return shareBy;
	}

	public void setShareBy(Long shareBy) {
		this.shareBy = shareBy;
	}
	
	@Length(min=1, max=1, message="字段长度超过限制|Field length exceeds limit")
	public String getIdentityFlag() {
		return identityFlag;
	}

	public void setIdentityFlag(String identityFlag) {
		this.identityFlag = identityFlag;
	}
	
	@Length(min=1, max=1, message="字段长度超过限制|Field length exceeds limit")
	public String getShareFlag() {
		return shareFlag;
	}

	public void setShareFlag(String shareFlag) {
		this.shareFlag = shareFlag;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
	@NotNull(message="使用时间不能为空|AvailableFrom can not be empty.")
	public Date getAvailableFrom() {
		return availableFrom;
	}

	public void setAvailableFrom(Date availableFrom) {
		this.availableFrom = availableFrom;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
	@NotNull(message="使用时间不能为空|AvailableTo can not be empty.")
	public Date getAvailableTo() {
		return availableTo;
	}

	public void setAvailableTo(Date availableTo) {
		this.availableTo = availableTo;
	}
	
	@Length(min=1, max=1, message="字段长度超过限制|Field length exceeds limit")
	public String getUsedFlag() {
		return usedFlag;
	}

	public void setUsedFlag(String usedFlag) {
		this.usedFlag = usedFlag;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

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

	public String getRule() {
		return rule;
	}

	public void setRule(String rule) {
		this.rule = rule;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
}