package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 配送员
 *
 * @author 科技小王子
 * @since 2026-01-30 15:14:15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopStoreRider对象", description = "配送员")
public class ShopStoreRider implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "门店ID")
    private Integer storeId;

    @Schema(description = "门店名称")
    @TableField(exist = false)
    private String storeName;

    @Schema(description = "骑手编号（可选）")
    private String riderNo;

    @Schema(description = "姓名")
    private String realName;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "身份证号（可选）")
    private String idCardNo;

    @Schema(description = "状态：1启用；0禁用")
    private Integer status;

    @Schema(description = "接单状态：0休息/下线；1在线；2忙碌")
    private Integer workStatus;

    @Schema(description = "是否开启自动派单：1是；0否")
    private Integer autoDispatchEnabled;

    @Schema(description = "派单优先级（同小区多骑手时可用，值越大越优先）")
    private Integer dispatchPriority;

    @Schema(description = "最大同时配送单数（0表示不限制）")
    private Integer maxOnhandOrders;

    @Schema(description = "是否计算工资(提成)：1计算；0不计算（如三方配送点可设0）")
    private Integer commissionCalcEnabled;

    @Schema(description = "水每桶提成金额（元/桶）")
    private BigDecimal waterBucketUnitFee;

    @Schema(description = "其他商品提成方式：1按订单固定金额；2按订单金额比例；3按商品规则(另表)")
    private Integer otherGoodsCommissionType;

    @Schema(description = "其他商品提成值：固定金额(元)或比例(%)")
    private BigDecimal otherGoodsCommissionValue;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "排序号")
    private Integer sortNumber;

    @Schema(description = "是否删除")
    private Integer isDelete;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
