package com.zhongshu.card.server.core.domain.org;

import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author TRX
 * @date 2024/12/19
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
public class UserGroupToUser extends SuperMain {

    @Schema(description = "所属分组")
    @DBRef(lazy = true)
    private UserGroup userGroup;

    @Schema(description = "分组ID")
    private String userGroupId;

    @Schema(description = "机构用户信息")
    @DBRef(lazy = true)
    private OrganizationUser organizationUser;

    @Schema(description = "机构用户数据id")
    private String orgDataId;

    @Indexed
    @Schema(description = "用户userId")
    private String userId;

    @Schema(description = "用户名称")
    private String userName;

}
