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

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.microsvc.toolkit.common.response.paging.QueryInfo;
import com.yonge.cooleshow.biz.dal.entity.TenantAlbumCategoryDetail;
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumCategoryDetailWrapper;
import com.yonge.cooleshow.common.enums.ETenantAlbumCategoryType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 机构专辑分类
 * 2023-10-10 09:48:46
 */
@ApiModel(value = "TenantAlbumCategoryVo对象", description = "机构专辑分类查询视图对象")
public class TenantAlbumCategoryVo {

    @Data
    @ApiModel(" TenantAlbumCategoryQuery-机构专辑分类")
    public static class TenantAlbumCategoryQuery implements QueryInfo {

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

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

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

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

    @Data
    @ApiModel(" TenantAlbumCategory-机构专辑分类")
    public static class TenantAlbumCategory {


        @ApiModelProperty("主键ID")
        private Long id;


        @ApiModelProperty("专辑分类名称")
        private String name;

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

        @ApiModelProperty("创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date createTime;

        @ApiModelProperty("修改人")
        private Long updateBy;

        @ApiModelProperty("修改人")
        private String updateUserName;

        @ApiModelProperty("更新时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date updateTime;


        @ApiModelProperty("专辑分类类别,CATEGORY_TYPE:类型,CATEGORY_LEVEL:级别")
        private ETenantAlbumCategoryType categoryType;

        @ApiModelProperty("专辑分类级别/类别值")
        private List<TenantAlbumCategoryDetail> values = new ArrayList<>();

        @ApiModelProperty("专辑分类级别/类别值内容")
        private String tenantAlbumCategoryContent;

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

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

}