File

src/entity/course-status.entity.ts

Index

Properties

Properties

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

@Entity()
export class CourseStatus {
  @PrimaryGeneratedColumn({
    unsigned: true,
  })
  id: number;

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

  @OneToMany(
    (type) => Course,
    (course) => course.courseStatus,
    { onDelete: "CASCADE", onUpdate: "CASCADE"}
  )
  course: Course[];
}

result-matching ""

    No results matching ""