Skip to content

Commit 8b3fb62

Browse files
committed
Typescript Bootcamp
1 parent a36b3df commit 8b3fb62

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

rest-api/src/models/course.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import {Column, CreateDateColumn, Entity,
2+
PrimaryGeneratedColumn, UpdateDateColumn} from "typeorm";
3+
4+
@Entity({
5+
name: "COURSES"
6+
})
7+
export class Course {
8+
9+
@PrimaryGeneratedColumn()
10+
id:number;
11+
12+
@Column()
13+
seqNo:number;
14+
15+
@Column()
16+
title:string;
17+
18+
@Column()
19+
iconUrl:string;
20+
21+
@Column()
22+
longDescription:string;
23+
24+
@Column()
25+
category: string;
26+
27+
@CreateDateColumn()
28+
createdAt: Date;
29+
30+
@UpdateDateColumn()
31+
lastUpdatedAt: Date;
32+
}

rest-api/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "ES5",
4-
"outDir": "dist"
4+
"outDir": "dist",
5+
"experimentalDecorators": true
56
}
67
}

0 commit comments

Comments
 (0)