package com.muchinfo.mtp3pojos.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.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 履约违约表 - 导历史
 * </p>
 *
 * @author XKF
 * @since 2024-11-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("PERFORMANCEBREACH")
@ApiModel(value="Performancebreach对象", description="履约违约表 - 导历史")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Performancebreach extends Model<Performancebreach> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "履约计划ID(130+Unix秒时间戳(10位)+xxxxxx)")
    private Long planid;

    @ApiModelProperty(value = "违约申请ID(132+Unix秒时间戳(10位)+xxxxxx)")
    @TableField("BREACHAPPLYID")
    private Long breachapplyid;

    @ApiModelProperty(value = "违约方 - 1:买方 2:卖方")
    @TableField("BREACHTYPE")
    private Integer breachtype;

    @ApiModelProperty(value = "违约处理状态 - 1:未完成 2:已处理 3:已成功")
    @TableField("BREACHSTATUS")
    private Integer breachstatus;

    @ApiModelProperty(value = "买方账号")
    @TableField("BUYACCOUNTID")
    private Long buyaccountid;

    @ApiModelProperty(value = "卖方账号")
    @TableField("SELLACCOUNTID")
    private Long sellaccountid;

    @ApiModelProperty(value = "买方应付/应收金额")
    @TableField("BUYAMOUNT")
    private BigDecimal buyamount;

    @ApiModelProperty(value = "买方已处理金额")
    @TableField("BUYAMOUNTHANDLED")
    private BigDecimal buyamounthandled;

    @ApiModelProperty(value = "卖方应付/应收金额")
    @TableField("SELLAMOUNT")
    private BigDecimal sellamount;

    @ApiModelProperty(value = "卖方已处理金额")
    @TableField("SELLAMOUNTHANDLED")
    private BigDecimal sellamounthandled;

    @ApiModelProperty(value = "交易所应收金额")
    @TableField("EXCHANGEAMOUNT")
    private BigDecimal exchangeamount;

    @ApiModelProperty(value = "交易所已处理金额")
    @TableField("EXCHANGEAMOUNTHANDLED")
    private BigDecimal exchangeamounthandled;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATETIME")
    private Date createtime;


    @Override
    public Serializable pkVal() {
        return this.planid;
    }

}
