package cn.newfeifan.mall.module.member.controller.admin.user.vo;

import cn.newfeifan.mall.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

import static cn.newfeifan.mall.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 会员用户分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MemberUserPageReqVO extends PageParam {


    @Schema(description = "用户Id", example = "1")
    private Long id;

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

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

    @Schema(description = "最后登录时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] loginDate;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "会员标签编号列表", example = "[1, 2]")
    private List<Long> tagIds;

    @Schema(description = "会员等级编号", example = "1")
    private Long levelId;

    @Schema(description = "用户分组编号", example = "1")
    private Long groupId;

    // TODO 非繁人：注册用户类型；

    // TODO 非繁人：登录用户类型；
    @Schema(description = "直接推荐人id", example = "15893")
    private Long recommenderdId;

    @Schema(description = "当前身价值")
    private Long currentMemberWorthValue;

    @Schema(description = "预增加身价值")
    private Long preAddedMemberWorthValue;

    @Schema(description = "未来身价值，未来身价值=当前身价值+预增加身价值")
    private Long futureMemberWorthValue;

    @Schema(description = "当前身价级别名称", example = "张三")
    private String currentMemberWorthLevelName;

    @Schema(description = "当前身价级别id", example = "24146")
    private Long currentMemberWorthLevelId;

    @Schema(description = "最后签到时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] lastSignInTime;

    @Schema(description = "连续签到天数")
    private LocalDateTime continuousSignInDays;

    @Schema(description = "当前积分值")
    private Long currentMemberPoints;

    @Schema(description = "预增加积分值")
    private Long preAddedMemberWorth;

    @Schema(description = "累计消费金额（只算人民币，单位为分）")
    private Long cumulativeSpending;
}
