Skip to content

Commit a8f1e9f

Browse files
author
Umed Khudoiberdiev
authored
Merge pull request #2 from emiyake/master
Entity decorator changed
2 parents ebdd1f4 + ae5b5c6 commit a8f1e9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/entity/Category.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {Table, PrimaryColumn, Column} from "typeorm";
1+
import {Entity, PrimaryColumn, Column} from "typeorm";
22

3-
@Table()
3+
@Entity()
44
export class Category {
55

66
@PrimaryColumn("int", { generated: true })
@@ -9,4 +9,4 @@ export class Category {
99
@Column()
1010
name: string;
1111

12-
}
12+
}

src/entity/Post.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {Table, PrimaryColumn, Column, ManyToMany, JoinTable} from "typeorm";
1+
import {Entity, PrimaryColumn, Column, ManyToMany, JoinTable} from "typeorm";
22
import {Category} from "./Category";
33

4-
@Table()
4+
@Entity()
55
export class Post {
66

77
@PrimaryColumn("int", { generated: true })
@@ -19,4 +19,4 @@ export class Post {
1919
@JoinTable()
2020
categories: Category[];
2121

22-
}
22+
}

0 commit comments

Comments
 (0)