import { ViewColumn, ViewEntity } from "typeorm"; @ViewEntity({ expression: `SELECT \`profileChild\`.\`id\` AS \`Id\`, \`profileChild\`.\`prefix\` AS \`prefix\`, \`profileChild\`.\`firstName\` AS \`firstName\`, \`profileChild\`.\`lastName\` AS \`lastName\`, \`profileChild\`.\`citizenId\` AS \`citizenId\`, \`profileChild\`.\`position\` AS \`position\`, CONCAT((CASE WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild1Id\` IS NULL) THEN \`orgRootChild\`.\`orgRootShortName\` WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild2Id\` IS NULL) THEN \`orgChild1Child\`.\`orgChild1ShortName\` WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild3Id\` IS NULL) THEN \`orgChild2Child\`.\`orgChild2ShortName\` WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild4Id\` IS NULL) THEN \`orgChild3Child\`.\`orgChild3ShortName\` ELSE \`orgChild4Child\`.\`orgChild4ShortName\` END), \`bma_ehr_organization_demo\`.\`posMaster\`.\`posMasterNo\`) AS \`posNo\`, \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, ' ', \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` FROM (((((((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) LEFT JOIN \`bma_ehr_organization_demo\`.\`orgRoot\` \`orgRootChild\` ON ((\`posMasterChild\`.\`orgRootId\` = \`orgRootChild\`.\`id\`))) LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild1\` \`orgChild1Child\` ON ((\`posMasterChild\`.\`orgChild1Id\` = \`orgChild1Child\`.\`id\`))) LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild2\` \`orgChild2Child\` ON ((\`posMasterChild\`.\`orgChild2Id\` = \`orgChild2Child\`.\`id\`))) LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild3\` \`orgChild3Child\` ON ((\`posMasterChild\`.\`orgChild3Id\` = \`orgChild3Child\`.\`id\`))) LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild4\` \`orgChild4Child\` ON ((\`posMasterChild\`.\`orgChild4Id\` = \`orgChild4Child\`.\`id\`))) JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`, }) export class viewDirectorActing { @ViewColumn() id: string; @ViewColumn() prefix: string; @ViewColumn() firstName: string; @ViewColumn() lastName: string; @ViewColumn() citizenId: string; @ViewColumn() position: string; @ViewColumn() posNo: string; @ViewColumn() posLevel: string; @ViewColumn() posType: string; @ViewColumn() isDirector: boolean; @ViewColumn() orgRootId: string; @ViewColumn() actFullNameId: string; @ViewColumn() actFullName: string; }