File

src/entity/language.entity.ts

Index

Properties

Properties

code
Type : string | null
Decorators :
@Column({nullable: true, length: 30, unique: true})
courses
Type : Course[]
Decorators :
@OneToMany(undefined, undefined, {onDelete: 'CASCADE', onUpdate: 'CASCADE', cascade: true})
flagURL
Type : string | null
Decorators :
@Column({nullable: true, length: 255})
id
Type : number
Decorators :
@PrimaryGeneratedColumn({unsigned: true})
name
Type : string | null
Decorators :
@Column({nullable: true, length: 255})
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { Course } from "./course.entity";
import { FilesCourse } from "./file-course.entity";
import { Files } from "./file-descriptor.entity";

@Entity()
export class Language {
  @PrimaryGeneratedColumn({
    unsigned: true,
  })
  id: number;
  @Column({
    nullable: true,
    length: 255,
  })
  name: string | null;

  @Column({
    nullable: true,
    length: 30,
    unique: true,
  })
  code: string | null;

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

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

result-matching ""

    No results matching ""