package com.ym.mec.biz.dal.entity;

import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.ym.mec.auth.api.entity.SysUser;
import com.ym.mec.biz.dal.enums.DealStatusEnum;
import com.ym.mec.biz.dal.enums.GroupType;
import com.ym.mec.biz.dal.enums.OrderTypeEnum;
import com.ym.mec.biz.dal.enums.PaymentChannelTypeEnum;

import org.springframework.data.annotation.Version;

/**
 * 对应数据库表(student_payment_order):
 */
public class StudentPaymentOrder {

	/**  */
	private Long id;
	
	private GroupType groupType;

	@Version
	private Integer version;
	/**  */
	@ApiModelProperty(value = "用户编号",required = true)
	private Integer userId;

	@ApiModelProperty(value = "分部编号",required = true)
	private Integer organId;

	@ApiModelProperty(value = "分配分部编号",required = true)
	private Integer routingOrganId;

	/** 订单类型(报名、续费、小课购买、其他) */
	@ApiModelProperty(value = "订单类型",required = true)
	private OrderTypeEnum type;
	
	/** 预计金额 */
	@ApiModelProperty(value = "预计金额",required = true)
	private BigDecimal expectAmount = BigDecimal.ZERO;
	
	/** 实际金额 */
	@ApiModelProperty(value = "实际金额",required = true)
	private BigDecimal actualAmount = BigDecimal.ZERO;

	/** 公户金额 */
	@ApiModelProperty(value = "公户金额",required = true)
	private BigDecimal comAmount = BigDecimal.ZERO;

	/** 私户金额 */
	@ApiModelProperty(value = "私户金额",required = true)
	private BigDecimal perAmount = BigDecimal.ZERO;
	
	@ApiModelProperty(value = "余额付款金额",required = true)
	private BigDecimal balancePaymentAmount = BigDecimal.ZERO;
	
	/** 交易流水号 */
	@ApiModelProperty(value = "交易流水号",required = true)
	private String transNo;
	
	/** 交易状态 */
	@ApiModelProperty(value = "交易状态",required = true)
	private DealStatusEnum status;
	
	/** 备注 */
	@ApiModelProperty(value = "备注",required = true)
	private String memo;
	
	/**  */
	private java.util.Date createTime;
	
	/**  */
	private java.util.Date updateTime;
	
	/** 付款渠道 */
	@ApiModelProperty(value = "付款渠道",required = true)
	private String paymentChannel;
	
	/** 业务渠道 */
	@ApiModelProperty(value = "业务渠道",required = true)
	private String paymentBusinessChannel;
	
	/** 付款账户 */
	@ApiModelProperty(value = "付款账户",required = true)
	private String paymentAccountNo;
	
	/** 订单号 */
	@ApiModelProperty(value = "订单号",required = true)
	private String orderNo;
	
	/**  */
	@ApiModelProperty(value = "乐团编号",required = true)
	private String musicGroupId;
	
	/**  */
	@ApiModelProperty(value = "课程组编号",required = true)
	private Integer classGroupId;

	private Date payTime;

	//收款账户
	private String merNos;

	@ApiModelProperty(value = "收货状态，NO_RECEIVE 未确认,MANUAL_RECEIVE 手动确认,AUTO_RECEIVE 自动确认",required = true)
	private String receiveStatus;

	private PaymentChannelTypeEnum paymentChannelType;
	
	private SysUser user = new SysUser();

	//乐器优惠金额
	private BigDecimal remitFee;

	//课程优惠金额
	private BigDecimal courseRemitFee;

	public String getReceiveStatus() {
		return receiveStatus;
	}

	public void setReceiveStatus(String receiveStatus) {
		this.receiveStatus = receiveStatus;
	}

	public void setId(Long id){
		this.id = id;
	}
	
	public Long getId(){
		return this.id;
	}
			
	public GroupType getGroupType() {
		return groupType;
	}

	public void setGroupType(GroupType groupType) {
		this.groupType = groupType;
	}

	public void setUserId(Integer userId){
		this.userId = userId;
	}
	
	public Integer getUserId(){
		return this.userId;
	}
			
	public void setTransNo(String transNo){
		this.transNo = transNo;
	}
	
	public String getTransNo(){
		return this.transNo;
	}
			
	public void setMemo(String memo){
		this.memo = memo;
	}
	
	public String getMemo(){
		return this.memo;
	}
			
	public void setCreateTime(java.util.Date createTime){
		this.createTime = createTime;
	}
	
	public java.util.Date getCreateTime(){
		return this.createTime;
	}
			
	public void setUpdateTime(java.util.Date updateTime){
		this.updateTime = updateTime;
	}
	
	public java.util.Date getUpdateTime(){
		return this.updateTime;
	}
			
	public void setPaymentChannel(String paymentChannel){
		this.paymentChannel = paymentChannel;
	}
	
	public String getPaymentChannel(){
		return this.paymentChannel;
	}
			
	public void setPaymentBusinessChannel(String paymentBusinessChannel){
		this.paymentBusinessChannel = paymentBusinessChannel;
	}
	
	public String getPaymentBusinessChannel(){
		return this.paymentBusinessChannel;
	}
			
	public void setPaymentAccountNo(String paymentAccountNo){
		this.paymentAccountNo = paymentAccountNo;
	}
	
	public String getPaymentAccountNo(){
		return this.paymentAccountNo;
	}
			
	public void setOrderNo(String orderNo){
		this.orderNo = orderNo;
	}
	
	public String getOrderNo(){
		return this.orderNo;
	}
			
	public void setMusicGroupId(String musicGroupId){
		this.musicGroupId = musicGroupId;
	}
	
	public String getMusicGroupId(){
		return this.musicGroupId;
	}
			
	public void setClassGroupId(Integer classGroupId){
		this.classGroupId = classGroupId;
	}
	
	public Integer getClassGroupId(){
		return this.classGroupId;
	}

	public OrderTypeEnum getType() {
		return type;
	}

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

	public BigDecimal getExpectAmount() {
		return expectAmount;
	}

	public void setExpectAmount(BigDecimal expectAmount) {
		this.expectAmount = expectAmount;
	}

	public BigDecimal getActualAmount() {
		return actualAmount;
	}

	public void setActualAmount(BigDecimal actualAmount) {
		this.actualAmount = actualAmount;
	}

	public BigDecimal getBalancePaymentAmount() {
		return balancePaymentAmount;
	}

	public void setBalancePaymentAmount(BigDecimal balancePaymentAmount) {
		this.balancePaymentAmount = balancePaymentAmount;
	}

	public DealStatusEnum getStatus() {
		return status;
	}

	public void setStatus(DealStatusEnum status) {
		this.status = status;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}
    public String getMerNos() {
        return merNos;
    }

    public void setMerNos(String merNos) {
        this.merNos = merNos;
    }

    public PaymentChannelTypeEnum getPaymentChannelType() {
        return paymentChannelType;
    }

    public void setPaymentChannelType(PaymentChannelTypeEnum paymentChannelType) {
        this.paymentChannelType = paymentChannelType;
    }

	public SysUser getUser() {
		return user;
	}

	public void setUser(SysUser user) {
		this.user = user;
	}

	public BigDecimal getComAmount() {
		return comAmount;
	}

	public void setComAmount(BigDecimal comAmount) {
		this.comAmount = comAmount;
	}

	public BigDecimal getPerAmount() {
		return perAmount;
	}

	public void setPerAmount(BigDecimal perAmount) {
		this.perAmount = perAmount;
	}

	public Integer getOrganId() {
		return organId;
	}

	public void setOrganId(Integer organId) {
		this.organId = organId;
	}


	public BigDecimal getRemitFee() {
		return remitFee;
	}

	public void setRemitFee(BigDecimal remitFee) {
		this.remitFee = remitFee;
	}

	public Integer getRoutingOrganId() {
		return routingOrganId;
	}

	public void setRoutingOrganId(Integer routingOrganId) {
		this.routingOrganId = routingOrganId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public BigDecimal getCourseRemitFee() {
		return courseRemitFee;
	}

	public void setCourseRemitFee(BigDecimal courseRemitFee) {
		this.courseRemitFee = courseRemitFee;
	}
}
