package com.yonge.cooleshow.admin.io.request;

import com.alibaba.fastjson.JSON;
import com.microsvc.toolkit.common.response.paging.QueryInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 购买训练工具记录
 * 2023-12-19 10:33:35
 */
@ApiModel(value = "UserTenantAlbumRecordVo对象", description = "购买训练工具记录查询视图对象")
public class UserTenantAlbumRecordVo {

    @Data
    @ApiModel(" UserTenantAlbumRecordQuery-购买训练工具记录")
    public static class UserTenantAlbumRecordQuery implements QueryInfo {

        @ApiModelProperty("当前页")
        private Integer page;

        @ApiModelProperty("分页行数")
        private Integer rows;

        public String jsonString() {
            return JSON.toJSONString(this);
        }

        public static UserTenantAlbumRecordQuery from(String json) {
            return JSON.parseObject(json, UserTenantAlbumRecordQuery.class);
        }
    }

    @Data
    @ApiModel(" UserTenantAlbumRecord-购买训练工具记录")
    public static class UserTenantAlbumRecord {


        @ApiModelProperty("记录id")
        private Long id;


        @ApiModelProperty(value = "用户id", required = true)
        @NotNull
        private Long userId;


        @ApiModelProperty(value = "机构ID", required = true)
        @NotNull
        private Long tenantId;


        @ApiModelProperty(value = "机构专辑ID", required = true)
        @NotNull
        private Long tenantAlbumId;


        @ApiModelProperty("订单号")
        private String orderNo;


        @ApiModelProperty("ORDER:订单")
        private String sourceType;


        @ApiModelProperty("购买人员类型 TEACHRE :老师端 STUDNET : 学生端")
        private String clientType;


        @ApiModelProperty("订单详情号")
        private String subOrderNo;


        @ApiModelProperty("开始时间")
        private Date startTime;


        @ApiModelProperty("结束时间")
        private Date endTime;


        @ApiModelProperty("创建时间")
        private Date createTime;


        @ApiModelProperty("创建人")
        private Long createBy;


        @ApiModelProperty("更新时间")
        private Date updateTime;


        @ApiModelProperty(value = "时间类型 DAY:天 MONTH:月，YEAR:年", required = true)
        @NotNull
        @Pattern(regexp = "^DAY|MONTH|YEAR$")
        private String type;


        @ApiModelProperty(value = "添加时间数量", required = true)
        @NotNull
        @Max(value = 999)
        private Integer times;


        @ApiModelProperty("消息发送 0、未发送 1、已发送提前3天消息 2、已发送会员过期消息 暂时不用")
        private Boolean msgStatus;


        @ApiModelProperty("备注")
        private String reason;


        public String jsonString() {
            return JSON.toJSONString(this);
        }

        public static UserTenantAlbumRecord from(String json) {
            return JSON.parseObject(json, UserTenantAlbumRecord.class);
        }
    }

}