oneuptime/Model/Models/File.ts
Simon Larsen 5fb65efd31
fix lint
2023-03-18 21:48:21 +00:00

28 lines
863 B
TypeScript

import { Entity } from 'typeorm';
import FileModel from 'Common/Models/FileModel';
import TableMetadata from 'Common/Types/Database/TableMetadata';
import IconProp from 'Common/Types/Icon/IconProp';
import Route from 'Common/Types/API/Route';
import CrudApiEndpoint from 'Common/Types/Database/CrudApiEndpoint';
import TableAccessControl from 'Common/Types/Database/AccessControl/TableAccessControl';
import Permission from 'Common/Types/Permission';
@TableMetadata({
tableName: 'File',
singularName: 'File',
pluralName: 'Files',
icon: IconProp.File,
tableDescription: 'BLOB or File storage',
})
@Entity({
name: 'File',
})
@CrudApiEndpoint(new Route('/file'))
@TableAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
delete: [],
update: [],
})
export default class File extends FileModel {}