src/entity/user-course.entity.ts
Properties |
course |
Type : Course | null
|
Decorators :
@ManyToOne(undefined, undefined, {onUpdate: 'CASCADE', onDelete: 'CASCADE'})
|
Defined in src/entity/user-course.entity.ts:59
|
courseId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/user-course.entity.ts:64
|
courseStart |
Type : Date | null
|
Decorators :
@Column({nullable: true})
|
Defined in src/entity/user-course.entity.ts:81
|
courseType |
Type : CourseType | null
|
Decorators :
@ManyToOne(undefined, undefined, {onUpdate: 'CASCADE', onDelete: 'CASCADE'})
|
Defined in src/entity/user-course.entity.ts:71
|
courseTypeId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/user-course.entity.ts:76
|
created |
Type : Date
|
Decorators :
@CreateDateColumn()
|
Defined in src/entity/user-course.entity.ts:92
|
examRating |
Type : Number | null
|
Decorators :
@Column({nullable: true})
|
Defined in src/entity/user-course.entity.ts:89
|
examSuccessful |
Type : Boolean
|
Decorators :
@Column({default: false})
|
Defined in src/entity/user-course.entity.ts:40
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({unsigned: true})
|
Defined in src/entity/user-course.entity.ts:12
|
isActive |
Type : Boolean
|
Decorators :
@Column({default: true})
|
Defined in src/entity/user-course.entity.ts:32
|
isFinished |
Type : Boolean
|
Decorators :
@Column({default: false})
|
Defined in src/entity/user-course.entity.ts:36
|
modified |
Type : Date
|
Decorators :
@UpdateDateColumn()
|
Defined in src/entity/user-course.entity.ts:95
|
name |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/user-course.entity.ts:18
|
pdfName |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/user-course.entity.ts:28
|
qrCode |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/user-course.entity.ts:23
|
timeSpent |
Type : Number | null
|
Decorators :
@Column('decimal', {default: 0})
|
Defined in src/entity/user-course.entity.ts:84
|
user |
Type : User | null
|
Decorators :
@ManyToOne(undefined, undefined, {onUpdate: 'CASCADE', onDelete: 'CASCADE'})
|
Defined in src/entity/user-course.entity.ts:47
|
userId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/user-course.entity.ts:52
|
import { Column, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { CourseType } from "./course-type.entity";
import { Course } from "./course.entity";
import { User } from "./user.entity";
@Entity()
export class UserCourse {
@PrimaryGeneratedColumn({
unsigned: true
})
id: number;
@Column({
nullable: true,
length: 255
})
name: string | null;
@Column({
nullable: true,
length: 255
})
qrCode: string | null;
@Column({
nullable: true,
length: 255
})
pdfName: string | null;
@Column({
default: true
})
isActive: Boolean;
@Column({
default: false
})
isFinished: Boolean;
@Column({
default: false
})
examSuccessful: Boolean;
@ManyToOne(
(type) => User,
(user) => user.userCourse,
{ onUpdate: "CASCADE", onDelete: "CASCADE" }
)
user: User | null;
@Column({
unsigned: true,
})
userId: number;
@ManyToOne(
(type) => Course,
(course) => course.userCourse,
{ onUpdate: "CASCADE", onDelete: "CASCADE" }
)
course: Course | null;
@Column({
unsigned: true,
})
courseId: number;
@ManyToOne(
(type) => CourseType,
(courseType) => courseType.userCourse,
{ onUpdate: "CASCADE", onDelete: "CASCADE" }
)
courseType: CourseType | null;
@Column({
unsigned: true,
})
courseTypeId: number;
@Column({
nullable: true,
})
courseStart: Date | null;
@Column("decimal", { default: 0 })
timeSpent: Number | null;
@Column({
nullable: true
})
examRating: Number | null;
@CreateDateColumn()
created: Date;
@UpdateDateColumn()
modified: Date;
}