import { Column , ColumnOptions } from 'typeorm' ; import { TYPEORM_HISTORY_SNAPSHOT_COLUMN } from './typeorm-history.constants' ; export function SnapshotColumn ( columnOpts ) { return ( target , key ) => { Reflect . defineMetadata ( TYPEORM_HISTORY_SNAPSHOT_COLUMN , key , target ) ; return Column ( { ... columnOpts , } ) ( target , key ) ; } ; }