nukak-express
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"type": "module", | ||
@@ -9,0 +9,0 @@ "main": "./index.js", |
@@ -92,7 +92,20 @@  | ||
/** | ||
* any class can be annotated with this decorator to make it works as | ||
* an entity. | ||
*/ | ||
@Entity() | ||
export class User { | ||
/** | ||
* an entity should specify an ID Field, its name and type are automatically detected. | ||
* the `onInsert` property can be used to specify a custom mechanism for | ||
* auto-generating the primary-key's value when inserting. | ||
*/ | ||
@Id({ onInsert: uuidv4 }) | ||
id?: string; | ||
/** | ||
* the properties of the class can be annotated with this decorator so they | ||
* are interpreted as a column, its name and type are automatically detected. | ||
*/ | ||
@Field() | ||
@@ -99,0 +112,0 @@ name?: string; |
77067
151