using System;
using Knot.Shared.Kernel;

namespace Knot.Modules.Messaging.Domain;

/// <summary>
/// Медиа-файл, прикрепленный к сообщению.
/// </summary>
public sealed class Media : Entity<Guid>
{
    public Guid MessageId { get; private set; }
    public string Type { get; private set; }
    public string Url { get; private set; }
    public string? Filename { get; private set; }
    public long? Size { get; private set; }

    internal Media(Guid messageId, string type, string url, string? filename, long? size) : base(Guid.NewGuid())
    {
        MessageId = messageId;
        Type = type;
        Url = url;
        Filename = filename;
        Size = size;
    }

    private Media() : base(Guid.Empty)
    {
        Type = string.Empty;
        Url = string.Empty;
    }
}


