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 = "StoreIncomeDetailsRecord对象", description = "商户收入明细表")
public class StoreIncomeDetailsRecord extends Model<StoreIncomeDetailsRecord> {

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

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

    @ApiModelProperty(value = "提现记录id")
    @TableField("cash_out_id")
    private Integer cashOutId;

    @ApiModelProperty(value = "收入类型, 0:全部, 1:代金, 2:团购")
    @TableField("income_type")
    private Integer incomeType;

    @ApiModelProperty(value = "业务id")
    @TableField("business_id")
    private Integer businessId;

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

    @ApiModelProperty(value = "提现金额, 单位分")
    @TableField(exist = false)
    private String moneyStr;

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

    @ApiModelProperty(value = "用户订单id")
    @TableField("user_order_id")
    private Integer userOrderId;

    @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;

}
