Skip to content

Commit d26451c

Browse files
2 parents a06cc3e + be70c51 commit d26451c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

example/models/Post.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {Comment} from "./Comment";
66
import {PostTopic} from "./PostTopic";
77
import {Topic} from "./Topic";
88
import {Author} from "./Author";
9+
import {Length} from "../../lib/annotations/validation/Length";
910

1011
@Scopes({
1112
full: {
@@ -47,3 +48,5 @@ export class Post extends Model<Post> {
4748
author?: Author;
4849

4950
}
51+
52+
Post.beforeCreate(post => {});

0 commit comments

Comments
 (0)