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

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

import java.util.Date;

import lombok.Data;

/**
 * 用户机构绑定解绑记录
 * 2023-12-04 15:30:02
 */
@ApiModel(value = "UserTenantBindRecordVo对象", description = "用户机构绑定解绑记录查询视图对象")
public class UserTenantBindRecordVo {

    @Data
    @ApiModel(" UserTenantBindRecordQuery-用户机构绑定解绑记录")
    public static class UserTenantBindRecordQuery implements QueryInfo {

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

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

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

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

    @Data
    @ApiModel(" UserTenantBindRecord-用户机构绑定解绑记录")
    public static class UserTenantBindRecord {


        @ApiModelProperty("")
        private Long id;


        @ApiModelProperty("用户ID")
        private Long userId;


        @ApiModelProperty("TEACHER:老师，STUDENT:学生")
        private String userType;


        @ApiModelProperty("机构ID")
        private Long tenantId;


        @ApiModelProperty("绑定状态:1:已绑定，0：未绑定")
        private Boolean bindStatus;


        @ApiModelProperty("绑定/解绑最新时间")
        private Date bindTime;

        @ApiModelProperty("姓名")
        private String userName;

        @ApiModelProperty("手机号")
        private String phone;

        @ApiModelProperty("小组名称")
        private String tenantGroupName;

        @ApiModelProperty("结算方式")
        private ESettlementFrom settlementFrom;

        @ApiModelProperty("锁定状态")
        private Boolean lockFlag;

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

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

}