package co.yixiang.yshop.module.distributor.controller.admin.distributoruser.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import javax.validation.constraints.*;

import org.springframework.format.annotation.DateTimeFormat;

import static co.yixiang.yshop.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 分销商所属用户 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class DistributorUserBaseVO {

    @Schema(description = "用户ID", example = "29341")
    private Long userId;

    @Schema(description = "所属一级ID")
    private Long superiorIdP1;

    @Schema(description = "上级名称")
    private String superiorNameP1;

    @Schema(description = "所属二级ID")
    private Long superiorIdP2;

    @Schema(description = "上级名称")
    private String superiorNameP2;

    @Schema(description = "过期时间", required = true)
    @NotNull(message = "过期时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime expireTime;

    @Schema(description = "用户昵称", example = "张三")
    private String nickname;

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

    @Schema(description = "商品数", example = "30188")
    private Integer productCount;

    @Schema(description = "订单数", example = "11278")
    private Integer orderCount;

    @Schema(description = "佣金数")
    private BigDecimal wages;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    private Integer isDistributor;

}
