Initial code commit
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 56s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 56s
This commit is contained in:
commit
db22585fcb
27 changed files with 2652 additions and 0 deletions
11
src/decorators/PartitionKey.ts
Normal file
11
src/decorators/PartitionKey.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import 'reflect-metadata';
|
||||
|
||||
/** Metadata key used to store the partition key of an entity */
|
||||
export const PARTITION_KEY_META = Symbol('polyglot:partitionKey');
|
||||
|
||||
/** Marks a property as the partition key of the entity. */
|
||||
export function PartitionKey(): PropertyDecorator {
|
||||
return (target, propertyKey) => {
|
||||
Reflect.defineMetadata(PARTITION_KEY_META, propertyKey, target.constructor);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue