src/storage/entities/files.entity.ts
Properties |
| filename |
Type : string
|
Decorators :
@Column()
|
|
Defined in src/storage/entities/files.entity.ts:13
|
| id |
Type : string
|
Decorators :
@PrimaryColumn()
|
|
Defined in src/storage/entities/files.entity.ts:10
|
|
The ID of the object. |
| tenant |
Type : TenantEntity
|
Decorators :
@ManyToOne(undefined, {cascade: true, onDelete: 'CASCADE'})
|
|
Defined in src/storage/entities/files.entity.ts:25
|
|
The tenant that owns this object. |
| tenantId |
Type : string
|
Decorators :
@Column('varchar', {primary: true})
|
|
Defined in src/storage/entities/files.entity.ts:19
|
|
Tenant ID for the key. |
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { TenantEntity } from "../../auth/tenant/entitites/tenant.entity";
@Entity()
export class FileEntity {
/**
* The ID of the object.
*/
@PrimaryColumn()
id!: string;
@Column()
filename!: string;
/**
* Tenant ID for the key.
*/
@Column("varchar", { primary: true })
tenantId!: string;
/**
* The tenant that owns this object.
*/
@ManyToOne(() => TenantEntity, { cascade: true, onDelete: "CASCADE" })
tenant!: TenantEntity;
}