File

src/entity/course-type.entity.ts

Index

Properties

Properties

id
Type : number
Decorators :
@PrimaryGeneratedColumn({unsigned: true})
name
Type : string | null
Decorators :
@Column({nullable: true, length: 255})
userCourse
Type : UserCourse[]
Decorators :
@OneToMany(undefined, undefined, {onDelete: 'CASCADE', onUpdate: 'CASCADE', cascade: true})
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { UserCourse } from "./user-course.entity";
import { User } from "./user.entity";

@Entity()
export class CourseType {

    @PrimaryGeneratedColumn({
        unsigned: true
    })
    id: number;

    @Column({
        nullable: true,
        length: 255
    })
    name: string | null;

    @OneToMany(type => UserCourse, userCourse => userCourse.courseType, { onDelete: 'CASCADE', onUpdate: 'CASCADE', cascade: true })
    userCourse: UserCourse[];
}

result-matching ""

    No results matching ""