package com.xdap.self_development.domain.view;

import com.definesys.mpaas.query.annotation.SQL;
import com.definesys.mpaas.query.annotation.SQLQuery;
import lombok.Data;

@SQLQuery(value = {
        @SQL(view = "getUserByDeptAndName",
                sql = "SELECT xu.id AS userId, xd.id AS departmentId FROM xdap_users xu LEFT JOIN xdap_dept_users xdu ON xu.id = xdu.user_id LEFT JOIN xdap_departments xd ON xdu.department_id = xd.id WHERE xu.username = #username AND xd.structure_name = #department AND xu.user_number = #account")
})
@Data
public class XdapUserView {
    private String userId;
    private String departmentId;
}
