src/entity/file-course.entity.ts
Properties |
course |
Type : Course | null
|
Decorators :
@ManyToOne(undefined, undefined, {onUpdate: 'CASCADE', onDelete: 'CASCADE'})
|
Defined in src/entity/file-course.entity.ts:29
|
courseId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/file-course.entity.ts:34
|
created |
Type : Date
|
Decorators :
@CreateDateColumn()
|
Defined in src/entity/file-course.entity.ts:37
|
file |
Type : Files | null
|
Decorators :
@ManyToOne(undefined, undefined, {onUpdate: 'CASCADE', onDelete: 'CASCADE'})
|
Defined in src/entity/file-course.entity.ts:17
|
fileId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/file-course.entity.ts:22
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({unsigned: true})
|
Defined in src/entity/file-course.entity.ts:10
|
modified |
Type : Date
|
Decorators :
@UpdateDateColumn()
|
Defined in src/entity/file-course.entity.ts:40
|
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Course } from "./course.entity";
import { Files } from "./file-descriptor.entity";
@Entity()
export class FilesCourse {
@PrimaryGeneratedColumn({
unsigned: true,
})
id: number;
@ManyToOne(
(type) => Files,
(file) => file.fileCourse,
{ onUpdate: "CASCADE", onDelete: "CASCADE" }
)
file: Files | null;
@Column({
unsigned: true,
})
fileId: number;
@ManyToOne(
(type) => Course,
(course) => course.userCourse,
{ onUpdate: "CASCADE", onDelete: "CASCADE" }
)
course: Course | null;
@Column({
unsigned: true,
})
courseId: number;
@CreateDateColumn()
created: Date;
@UpdateDateColumn()
modified: Date;
}