package com.zhongshu.card.client.model.devices.permiss;

import com.github.microservice.auth.security.type.AuthType;
import com.github.microservice.models.type.DeviceType;
import com.zhongshu.card.client.model.base.SuperSearch;
import com.zhongshu.card.client.type.OnLineState;
import com.zhongshu.card.client.type.UserState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author TRX
 * @date 2024/10/11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DevicePermissSearch extends SuperSearch {

    //------------------设备冗余数据 start-------------------

    private String deviceId;

    @Schema(description = "")
    private String deviceKeyWord;

    @Schema(description = "设备类型，如 消费机 门禁机")
    private DeviceType deviceType;

    @Schema(description = "区域信息")
    private String areaId;

    @Schema(description = "区域所有上级ID路径，如：a1/a12/a123")
    private String areaPaths = "";

    @Schema(description = "是否在线")
    private OnLineState onLineState;

    //---------------用户冗余数据 start--------------

    @Schema(description = "用户所属机构的类型")
    private AuthType authType;

    @Schema(description = "用户搜索")
    private String userKeyWord;

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

    @Schema(description = "用户所属机构oid")
    private String userOid;

    @Schema(description = "职位")
    private String positionId;

    @Schema(description = "角色信息")
    private List<String> roleIds;

    @Schema(description = "部门信息")
    private List<String> departmentIds;

    @Schema(description = "用户状态")
    private UserState state = UserState.Normal;

    @Schema(description = "权限是否下发")
    private Boolean isUsed = Boolean.FALSE;
}
