import { Entity, Property, Enum } from '@mikro-orm/core';
import { BaseEntity } from '../_BaseEntity';

export enum AssetType {
    SYSTEM_LOGO = 'system_logo',
    USER_AVATAR = 'user_avatar',
    DOCUMENT = 'document',
    OTHER = 'other'
}

@Entity()
export class Asset extends BaseEntity {
    @Property()
    name!: string;

    @Property()
    type!: string;

    @Property({ type: 'text' })
    data!: string; // Base64 encoded data

    @Property()
    mimeType!: string;

    @Property({ nullable: true })
    size?: number;

    @Enum(() => AssetType)
    assetType!: AssetType;
} 