package com.yonge.cooleshow.biz.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonge.cooleshow.biz.dal.enums.AccountBizTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.InOrOutEnum;
import com.yonge.cooleshow.common.enums.PostStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;

/**
 * 用户账户流水表
 */
@TableName("user_cash_account_record")
@ApiModel(value = "UserAccountRecord对象", description = "用户账户流水表")
public class UserAccountRecord implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("id ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "账户id ",required = true)
    @TableField(value = "account_id_")
    private Long accountId;
    @ApiModelProperty(value = "交易金额 ",required = true)
    @TableField(value = "trans_amount_")
    private BigDecimal transAmount;
    @ApiModelProperty("账户余额 ")
    @TableField(value = "account_balance_")
    private BigDecimal accountBalance;
    @ApiModelProperty(value = "收支类型：IN、收入 OUT、支出 ",required = true)
    @TableField(value = "in_or_out_")
    private InOrOutEnum inOrOut;
    @ApiModelProperty(value = "入账状态 WAIT 待入账 FROZEN 冻结入账 RECORDED 已入账 CANCEL 退费 ")
    @TableField(value = "post_status_")
    private PostStatusEnum postStatus;
    @ApiModelProperty(value = "业务类型：PRACTICE、陪练课 LIVE、直播课 VIDEO、视频课 MUSIC、乐谱 WITHDRAWAL、提现 " +
            "LIVE_SHARE、直播课分润 VIDEO_SHARE、视频课分润 MUSIC_SHARE、乐谱分润 VIP_SHARE、会员分润 MALL_SHARE、商品分润 ACTI_REGIST_SHARE、活动报名分润",required = true)
    @TableField(value = "biz_type_")
    private AccountBizTypeEnum bizType;
    @ApiModelProperty("业务id(陪练课,直播课course_schedule_id_ | 视频课,乐谱为课程组曲子id | 提现为提现记录id | 会员分润为会员购买记录id | 商品分润为商品订单id）")
    @TableField(value = "biz_id_")
    private Long bizId;
    @ApiModelProperty("业务名称 ")
    @TableField(value = "biz_name_")
    private String bizName;
    @ApiModelProperty("订单号 ")
    @TableField(value = "order_no_")
    private String orderNo;
    @ApiModelProperty("购买人id")
    @TableField(value = "buy_user_")
    private Long buyUser;
    @ApiModelProperty("创建时间 ")
    @TableField(value = "create_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty("更新时间 ")
    @TableField(value = "update_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
    @ApiModelProperty("是否异常 ")
    @TableField(value = "err_flag_")
    private Integer errFlag = 0;
    @ApiModelProperty("异常信息 ")
    @TableField(value = "err_msg_")
    private String errMsg;
    @TableField("account_period_time_")
    @ApiModelProperty(value = "账期时间")
    private Date accountPeriodTime;

    public Long getId() {
        return id;
    }

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

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public BigDecimal getTransAmount() {
        return transAmount;
    }

    public void setTransAmount(BigDecimal transAmount) {
        this.transAmount = transAmount;
    }

    public BigDecimal getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(BigDecimal accountBalance) {
        this.accountBalance = accountBalance;
    }

    public InOrOutEnum getInOrOut() {
        return inOrOut;
    }

    public void setInOrOut(InOrOutEnum inOrOut) {
        this.inOrOut = inOrOut;
    }

    public AccountBizTypeEnum getBizType() {
        return bizType;
    }

    public void setBizType(AccountBizTypeEnum bizType) {
        this.bizType = bizType;
    }

    public Long getBizId() {
        return bizId;
    }

    public void setBizId(Long bizId) {
        this.bizId = bizId;
    }

    public String getBizName() {
        return bizName;
    }

    public void setBizName(String bizName) {
        this.bizName = bizName;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getErrFlag() {
        return errFlag;
    }

    public void setErrFlag(Integer errFlag) {
        this.errFlag = errFlag;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public PostStatusEnum getPostStatus() {
        return postStatus;
    }

    public void setPostStatus(PostStatusEnum postStatus) {
        this.postStatus = postStatus;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getAccountPeriodTime() {
        return accountPeriodTime;
    }

    public void setAccountPeriodTime(Date accountPeriodTime) {
        this.accountPeriodTime = accountPeriodTime;
    }

    public Long getBuyUser() {
        return buyUser;
    }

    public void setBuyUser(Long buyUser) {
        this.buyUser = buyUser;
    }
}