forked from Ynov/ptitspas-ynov-back
uploads added
This commit is contained in:
parent
3a47d86e2b
commit
1b07f7dce2
21
src/entities/uploads.entity.ts
Normal file
21
src/entities/uploads.entity.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||||
|
import { Users } from "./users.entity";
|
||||||
|
|
||||||
|
@Entity('uploads')
|
||||||
|
export class Upload {
|
||||||
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => Users, { onDelete: 'SET NULL', nullable: true })
|
||||||
|
@JoinColumn({ name: 'id_utilisateur', referencedColumnName: 'id' })
|
||||||
|
user?: Users;
|
||||||
|
|
||||||
|
@Column({ type: 'text', name: 'fichier_url' })
|
||||||
|
file_url: string;
|
||||||
|
|
||||||
|
@Column({type: 'varchar', length: 50, nullable: true, name: 'type'})
|
||||||
|
type?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn({ name: 'cree_le', type: 'timestamptz' })
|
||||||
|
created_at: Date;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user