package cn.cslg.pas.domain;

import cn.cslg.pas.common.model.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 分配表
 * </p>
 *
 * @author 王岩
 * @since 2022-02-18
 */
@Data
@TableName("os_distribution_doing")
public class ProjectUser extends BaseEntity<ProjectUser> {

    /**
     * 账号id（userid）
     */
    @TableField("uid")
    private Integer userId;

    /**
     * 租户id
     */
    @TableField("tenantId")
    private Integer tenantId;

    /**
     * 专题库id
     */
    @TableField("tid")
    private Integer projectId;

    /**
     *  添加时间
     */
    @TableField("addtime")
    private Integer createTime;

    /**
     * 备注
     */
    private String remark;
    @TableField(exist = false)
    private List<User> users;

    /**
     * 权限 1分类人，2管理员，3查阅人
     */
    private Integer type;

    @TableField(exist = false)
    private List<String> roles;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String name;

    @TableField(exist = false)
    List<Integer> userIds;

    @Data
    public static class User{
        private Integer userId;
        private Integer tenantId;

    }
}
