package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

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

/**
 * 分销商申请记录表
 *
 * @author 科技小王子
 * @since 2025-08-11 23:50:18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopDealerApply对象", description = "分销商申请记录表")
public class ShopDealerApply implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "apply_id", type = IdType.AUTO)
    private Integer applyId;

    @Schema(description = "0经销商,1企业也,2集团)")
    private Integer type;

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

    @Schema(description = "昵称")
    @TableField(exist = false)
    private String nickName;

    @Schema(description = "手机号码")
    @TableField(exist = false)
    private String phone;

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

    @Schema(description = "分销商名称")
    private String dealerName;

    @Schema(description = "分销商编码")
    private String dealerCode;

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

    @Schema(description = "合同金额")
    private BigDecimal money;

    @Schema(description = "详细地址")
    private String address;

    @Schema(description = "社区")
    private String community;

    @Schema(description = "楼栋号")
    private String buildingNumber;

    @Schema(description = "单元号")
    private String unitNumber;

    @Schema(description = "房号")
    private String roomNumber;

    @Schema(description = "佣金比例")
    @TableField(exist = false)
    private BigDecimal rate;

    @Schema(description = "推荐人用户ID")
    private Integer refereeId;

    @Schema(description = "申请方式(10需后台审核 20无需审核)")
    private Integer applyType;

    @Schema(description = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applyTime;

    @Schema(description = "审核状态 (10待审核 20审核通过 30驳回)")
    private Integer applyStatus;

    @Schema(description = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime auditTime;

    @Schema(description = "合同时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime contractTime;

    @Schema(description = "到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expirationTime;

    @Schema(description = "驳回原因")
    private String rejectReason;

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

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

    @Schema(description = "推荐人名称")
    @TableField(exist = false)
    private String refereeName;

}
