import { DataSource } from 'typeorm';

export async function handler(dataSource: DataSource) {
  const [{ totel }] = await dataSource.query(`
    select count(u.id) as totel from user u 
    left join role r 
    on u.role_id = r.id 
    where u.del_flag =0 and r.base = 3
  `);
  return totel;
}
