package cn.iocoder.byzs.module.system.controller.admin.invitecode.vo;

import cn.iocoder.byzs.framework.excel.core.annotations.DictFormat;
import cn.iocoder.byzs.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Set;

@Schema(description = "管理后台 - 邀请码 Response VO")
@Data
@ExcelIgnoreUnannotated
public class InviteCodeRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "邀请码")
    @ExcelProperty("邀请码")
    private String code;

    @Schema(description = "绑定角色")
    @ExcelProperty("绑定角色")
    private String roleIds;

    @Schema(description = "绑定角色名称")
    @ExcelProperty("绑定角色名称")
    private Set<String> roleNames;

    @Schema(description = "有效期（天）")
    @ExcelProperty("有效期（天）")
    private Integer validTime;

    @Schema(description = "使用时间")
    @ExcelProperty("使用时间")
    private LocalDateTime useTime;

    @Schema(description = "过期时间")
    @ExcelProperty("过期时间")
    private LocalDateTime expireTime;

    @Schema(description = "使用用户id")
    @ExcelProperty("使用用户id")
    private Long useUserId;

    @Schema(description = "使用用户名")
    @ExcelProperty("使用用户名")
    private String useUserName;

    @Schema(description = "使用用户租户id")
    @ExcelProperty(value = "使用用户租户id", converter = DictConvert.class)
    @DictFormat("common_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Long useUserTenantId;

    @Schema(description = "使用用户租户名称")
    @ExcelProperty("使用用户租户名称")
    private String useUserTenantName;

    @Schema(description = "状态")
    @ExcelProperty("状态")
    private String status;

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

    @Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24563")
    @ExcelProperty("租户编号")
    private Long tenantId;

}