333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
{"version":3,"sources":["../../src/decorator/columns/CreateDateColumn.ts"],"names":[],"mappings":";;AAAA,4BAA6D;AAG7D;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAuB;IACpD,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,0BAAsB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;YAClC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,OAAO,IAAI,EAAE;SACH,CAAC,CAAC;IAC7B,CAAC,CAAC;AACN,CAAC;AATD,4CASC","file":"CreateDateColumn.js","sourcesContent":["import {ColumnOptions, getMetadataArgsStorage} from \"../../\";\nimport {ColumnMetadataArgs} from \"../../metadata-args/ColumnMetadataArgs\";\n\n/**\n * This column will store a creation date of the inserted object.\n * Creation date is generated and inserted only once,\n * at the first time when you create an object, the value is inserted into the table, and is never touched again.\n */\nexport function CreateDateColumn(options?: ColumnOptions): Function {\n    return function (object: Object, propertyName: string) {\n        getMetadataArgsStorage().columns.push({\n            target: object.constructor,\n            propertyName: propertyName,\n            mode: \"createDate\",\n            options: options || {}\n        } as ColumnMetadataArgs);\n    };\n}\n"],"sourceRoot":"../.."}