src/entity/file-descriptor.entity.ts
Properties |
connected |
Type : Boolean | null
|
Decorators :
@Column({default: false})
|
Defined in src/entity/file-descriptor.entity.ts:54
|
created |
Type : Date
|
Decorators :
@CreateDateColumn()
|
Defined in src/entity/file-descriptor.entity.ts:57
|
fileCourse |
Type : FilesCourse
|
Decorators :
@OneToMany(undefined, undefined, {onDelete: 'CASCADE', onUpdate: 'CASCADE', cascade: true})
|
Defined in src/entity/file-descriptor.entity.ts:74
|
fileName |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/file-descriptor.entity.ts:26
|
fileSavedName |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/file-descriptor.entity.ts:32
|
fileSavedURL |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 255})
|
Defined in src/entity/file-descriptor.entity.ts:38
|
fileType |
Type : FileType
|
Decorators :
@ManyToOne(undefined, undefined, {onDelete: 'CASCADE', onUpdate: 'CASCADE', cascade: true})
|
Defined in src/entity/file-descriptor.entity.ts:81
|
fileTypeId |
Type : number
|
Decorators :
@Column({unsigned: true})
|
Defined in src/entity/file-descriptor.entity.ts:85
|
global |
Type : Boolean | null
|
Decorators :
@Column({default: true})
|
Defined in src/entity/file-descriptor.entity.ts:49
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({unsigned: true})
|
Defined in src/entity/file-descriptor.entity.ts:20
|
modified |
Type : Date
|
Decorators :
@UpdateDateColumn()
|
Defined in src/entity/file-descriptor.entity.ts:60
|
tag |
Type : string | null
|
Decorators :
@Column({nullable: true, length: 20})
|
Defined in src/entity/file-descriptor.entity.ts:44
|
import {
Column,
CreateDateColumn,
Entity,
ManyToOne,
OneToMany,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from "typeorm";
import { Course } from "./course.entity";
import { FilesCourse } from "./file-course.entity";
import { FileType } from "./file-type.entity";
import { User } from "./user.entity";
@Entity()
export class Files {
@PrimaryGeneratedColumn({
unsigned: true,
})
id: number;
@Column({
nullable: true,
length: 255,
})
fileName: string | null;
@Column({
nullable: true,
length: 255,
})
fileSavedName: string | null;
@Column({
nullable: true,
length: 255,
})
fileSavedURL: string | null;
@Column({
nullable: true,
length: 20,
})
tag: string | null;
@Column({
default: true,
})
global: Boolean | null;
@Column({
default: false,
})
connected: Boolean | null;
@CreateDateColumn()
created: Date;
@UpdateDateColumn()
modified: Date;
// @ManyToOne(
// (type) => Course,
// (course) => course.files,
// { onDelete: "CASCADE", onUpdate: "CASCADE", cascade: true }
// )
// course: Course;
@OneToMany(
(type) => FilesCourse,
(fileCourse) => fileCourse.file,
{ onDelete: "CASCADE", onUpdate: "CASCADE", cascade: true }
)
fileCourse: FilesCourse;
@ManyToOne(
(type) => FileType,
(fileType) => fileType.files,
{ onDelete: "CASCADE", onUpdate: "CASCADE", cascade: true }
)
fileType: FileType;
@Column({
unsigned: true,
})
fileTypeId: number;
}