UNPKG

@cyber-rom/nestjs-scylladb

Version:

Based on https://www.npmjs.com/package/@ouato/nestjs-express-cassandra With support columns name mapping

15 lines (13 loc) 458 B
import {getOptions, addOptions} from '../utils/decorator.utils'; export function EntityMethod(): MethodDecorator { return (target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<any>) => { const {methods} = getOptions(target); addOptions(target, { methods: { ...(methods || {}), [propertyKey]: descriptor.value, }, }); return descriptor; }; }