A compound represented by a general formula I or a pharmaceutically acceptable salt, stereoisomer, ester, solvate, or deuterated compound thereof: wherein A is selected from C or N; when A is N, R 5 is absent; and when A is C, R 5 is selected from: H, C 1-3 alkyl, and -OC 0-2 alkyl; X is selected from: R is selected from: C 1-6 linear alkyl; H attached to carbon atoms may be substituted by the following groups: deutero, hydroxy, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-3 linear alkyl, or C 3-6 cycloalkyl; Y is selected from: R 3 and R 4 are independently selected from: H, halogen, -CN, C 1-6 linear alkyl, and C 3-6 cycloalkyl; an alkyl moiety may be optionally substituted by any one or more of the following groups: hydroxy, -OC 1-10 alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), C 6-18 aryl, heterocycloalkyl or heterocycloaryl; and m is selected from 0, 1, 2, 3 or 4; Z is R 1 and R 2 are independently selected from: H, halogen, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-10 linear or branched alkyl, C 3-10 cycloalkyl, -OC 0-10 alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), -O heterocycloalkyl, -N heterocycloalkyl, -S heterocycloalkyl, phenyl, -N heterocycloaryl, -S heterocycloaryl or -O heterocycloaryl, wherein, H attached to carbon or nitrogen atoms may be substituted by the following groups: deutero, hydroxy, halogen, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-6 linear alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), -OC 0-10 alkyl, C 3-10 cycloalkyl, -O heterocycloalkyl, -N heterocycloalkyl, -S heterocycloalkyl, phenyl, -N heterocycloaryl, -O heterocycloaryl or -S heterocycloaryl; wherein H on the phenyl or heterocycloaryl may be substituted by any one or more of the following groups: halogen, C 1-4 linear alkyl, -N(C 0-10 alkyl)SO 2 (C 0-10 alkyl), -CON(C 0-10 alkyl)(C 0-10 alkyl), -N(C 0-10 alkyl)CO(C 0-10 alkyl), -N(C 0-10 alkyl)COO(C 0-10 alkyl), -OCON(C 0-10 alkyl)(C 0-10 alkyl), -CN, -OCH 2 F, -OCHF 2, -OCF 3, -N(C 0-10 alkyl)(C 0-10 alkyl), -OC 0-10 alkyl, -N heterocycloaryl, -O heterocycloaryl or -S heterocycloaryl; and R 7 and R 8 are independently selected from: H, C 1-3 alkyl, and -OC 0-2 alkyl. wherein A is selected from C or N; when A is N, R 5 is absent; and when A is C, R 5 is selected from: H, C 1-3 alkyl, and -OC 0-2 alkyl; X is selected from: R is selected from: C 1-6 linear alkyl; H attached to carbon atoms may be substituted by the following groups: deutero, hydroxy, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-3 linear alkyl, or C 3-6 cycloalkyl; Y is selected from: R 3 and R 4 are independently selected from: H, halogen, -CN, C 1-6 linear alkyl, and C 3-6 cycloalkyl; an alkyl moiety may be optionally substituted by any one or more of the following groups: hydroxy, -OC 1-10 alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), C 6-18 aryl, heterocycloalkyl or heterocycloaryl; and m is selected from 0, 1, 2, 3 or 4; Z is R 1 and R 2 are independently selected from: H, halogen, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-10 linear or branched alkyl, C 3-10 cycloalkyl, -OC 0-10 alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), -O heterocycloalkyl, -N heterocycloalkyl, -S heterocycloalkyl, phenyl, -N heterocycloaryl, -S heterocycloaryl or -O heterocycloaryl, wherein, H attached to carbon or nitrogen atoms may be substituted by the following groups: deutero, hydroxy, halogen, -CN, -OCH 2 F, -OCHF 2, -OCF 3, C 1-6 linear alkyl, -N(C 0-10 alkyl)(C 0-10 alkyl), -OC 0-10 alkyl, C 3-10 cycloalkyl, -O heterocycloalkyl, -N heterocycloalkyl, -S heterocycloalkyl, phenyl, -N heterocycloaryl, -O heterocycloaryl or -S heterocycloaryl; wherein H on the phenyl or heterocycloaryl may be substituted by any one or more of the following groups: halogen, C 1-4 linear alkyl, -N(C 0-10 alkyl)SO 2 (C 0-10 alkyl), -CON(C 0-10 alkyl)(C 0-10 alkyl), -N(C 0-10 alkyl)CO(C 0-10 alkyl), -N(C 0-10 alkyl)COO(C 0-10 alkyl), -OCON(C 0-10 alkyl)(C 0-10 alkyl), -CN, -OCH 2 F, -OCHF 2, -OCF 3, -N(C 0-10 alkyl)(C 0-10 alkyl), -OC 0-10 alkyl, -N heterocycloaryl, -O heterocycloaryl or -S heterocycloaryl; and R 7 and R 8 are independently selected from: H, C 1-3 alkyl, and -OC 0-2 alkyl.