Commit 853786b2 authored by nanahira's avatar nanahira

readme

parent 62d28c7f
......@@ -22,12 +22,14 @@ Those decorators would all decorate the following, with the SAME settings.
@Entity()
export class User extends IdBase() {
@Index()
@QueryLike() // queries as 'where name LIKE :name%'
@StringColumn(5, {
required: true,
description: 'User name',
})
name: string;
@QueryEqual() // queries as 'where age = :age'
@IntColumn('int', { unsigned: true, description: 'User age', default: 20 })
age: number;
......@@ -59,9 +61,14 @@ export class User extends IdBase() {
this.name = this.name.toUpperCase(); // Do something after create before sending to user.
}
override async beforeGet() {}
override async afterGet() {}
override async beforeUpdate() {}
override async beforeGet() {
}
override async afterGet() {
}
override async beforeUpdate() {
}
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment