first commit

This commit is contained in:
Bastian Wagner
2026-07-31 21:02:47 +02:00
commit 6bea4f766a
512 changed files with 64459 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import {
Column,
Entity,
PrimaryGeneratedColumn,
AfterLoad,
AfterInsert,
} from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
import { Allow } from 'class-validator';
import { EntityHelper } from 'src/utils/entity-helper';
import appConfig from '../../config/app.config';
@Entity({ name: 'file' })
export class FileEntity extends EntityHelper {
@ApiProperty({ example: 'cbcfa8b8-3a25-4adb-a9c6-e325f0d0f3ae' })
@PrimaryGeneratedColumn('uuid')
id: string;
@Allow()
@Column()
path: string;
@AfterLoad()
@AfterInsert()
updatePath() {
if (this.path.indexOf('/') === 0) {
this.path = appConfig().backendDomain + this.path;
}
}
}