package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 商户提现记录表
 *
 * @author ssk
 * @since 2025-02-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "StoreCashOutRecord对象", description = "商户提现记录表")
public class StoreCashOutRecord extends Model<StoreCashOutRecord> {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "门店id")
    @TableField(value = "store_id")
    private Integer storeId;

    @ApiModelProperty(value = "提现金额, 单位分")
    @TableField("money")
    private Integer money;

    @ApiModelProperty(value = "手续费")
    @TableField("commission")
    private Integer commission;

    @ApiModelProperty(value = "提现类型, 0:手动, 1:自动")
    @TableField("cash_out_type")
    private Integer cashOutType;

    @ApiModelProperty(value = "商户订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "支付宝订单号")
    @TableField("ali_order_no")
    private String aliOrderNo;

    @ApiModelProperty(value = "收益开始时间")
    @TableField("income_start_time")
    private Date incomeStartTime;

    @ApiModelProperty(value = "收益结束时间")
    @TableField("income_end_time")
    private Date incomeEndTime;

    @ApiModelProperty(value = "到账时间")
    @TableField("payment_date")
    private Date paymentDate;

    @ApiModelProperty(value = "提现状态, 0:进行中, 1:成功, 2:失败，3待审核，4已拒绝，5审核通过")
    @TableField("payment_status")
    private Integer paymentStatus;

    @ApiModelProperty(value = "已到账期弹窗,0:弹, 1:不弹")
    @TableField("alert_status")
    private Integer alertStatus;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;

    @ApiModelProperty(value = "审批时间")
    @TableField(value = "approve_time", fill = FieldFill.INSERT)
    private Date approveTime;

    @ApiModelProperty(value = "支付时间")
    @TableField(value = "pay_date", fill = FieldFill.INSERT)
    private Date payDate;

    @ApiModelProperty(value = "查看失败原因")
    @TableField(value = "fail_reason")
    private String failReason;

    @ApiModelProperty(value = "申请storeUserID")
    @TableField(value = "store_user_id")
    private Integer storeUserId;
    @ApiModelProperty(value = "审批备注")
    @TableField(value = "comments")
    private String comments;

    @ApiModelProperty(value = "结算账户")
    @TableField(value = "settlement_account")
    private String settlementAccount;

    @ApiModelProperty(value = "拒绝原因")
    @TableField(value = "approve_fail_reason")
    private String approveFailReason;
}
