{"version":3,"sources":["../browser/src/decorator/entity/Entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,sBAAsB,EAAC,MAAM,QAAQ,CAAC;AAe7D;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,aAAoC,EAAE,YAA4B;IACrF,IAAM,OAAO,GAAG,CAAC,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,aAA8B,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC1G,IAAM,IAAI,GAAG,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAE9E,OAAO,UAAU,MAAgB;QAC7B,sBAAsB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;YACjC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YACtD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACnD,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACzD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACnD,WAAW,EAAE,OAAO,CAAC,WAAW;SACd,CAAC,CAAC;IAC5B,CAAC,CAAC;AACN,CAAC","file":"Entity.js","sourcesContent":["import {EntityOptions, getMetadataArgsStorage} from \"../../\";\nimport {TableMetadataArgs} from \"../../metadata-args/TableMetadataArgs\";\n\n/**\n * This decorator is used to mark classes that will be an entity (table or document depend on database type).\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function Entity(options?: EntityOptions): Function;\n\n/**\n * This decorator is used to mark classes that will be an entity (table or document depend on database type).\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function Entity(name?: string, options?: EntityOptions): Function;\n\n/**\n * This decorator is used to mark classes that will be an entity (table or document depend on database type).\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function Entity(nameOrOptions?: string|EntityOptions, maybeOptions?: EntityOptions): Function {\n const options = (typeof nameOrOptions === \"object\" ? nameOrOptions as EntityOptions : maybeOptions) || {};\n const name = typeof nameOrOptions === \"string\" ? nameOrOptions : options.name;\n\n return function (target: Function) {\n getMetadataArgsStorage().tables.push({\n target: target,\n name: name,\n type: \"regular\",\n orderBy: options.orderBy ? options.orderBy : undefined,\n engine: options.engine ? options.engine : undefined,\n database: options.database ? options.database : undefined,\n schema: options.schema ? options.schema : undefined,\n synchronize: options.synchronize\n } as TableMetadataArgs);\n };\n}\n"],"sourceRoot":"../.."}
|