package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 分账延时发放表 实体类。
 *
 * @author ww
 * @since 2025-10-30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_distribution_deliver")
@Accessors(chain = true)
public class MkDistributionDeliver implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 订单id
     */
    private Long sourceId;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * order订单recharge充值
     */
    private String type;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 应该发放时间
     */
    private LocalDateTime shouldDeliverTime;

    /**
     * pending待发放 success成功发放 fail发放失败
     */
    private String status;

    /**
     * 失败原因
     */
    private String msg;

}
