using MediatR;

namespace MktXService.API.Application.Commands;

/// <summary>
/// EN: Command to create a new contact.
/// VI: Command để tạo liên hệ mới.
/// </summary>
public record CreateContactCommand(
    Guid AccountId,
    string TwitterUserId,
    string Username,
    string Source,
    string? DisplayName = null,
    string? ProfileImageUrl = null,
    Dictionary<string, object>? Attributes = null,
    List<string>? Tags = null
) : IRequest<CreateContactResult>;

public record CreateContactResult(bool Success, Guid? ContactId, string? Error);

/// <summary>
/// EN: Command to update contact profile.
/// VI: Command để cập nhật profile liên hệ.
/// </summary>
public record UpdateContactCommand(
    Guid ContactId,
    string Username,
    string? DisplayName = null,
    string? ProfileImageUrl = null
) : IRequest<bool>;

/// <summary>
/// EN: Command to add a tag to contact.
/// VI: Command để thêm tag cho liên hệ.
/// </summary>
public record AddContactTagCommand(Guid ContactId, string TagName) : IRequest<bool>;

/// <summary>
/// EN: Command to remove a tag from contact.
/// VI: Command để xóa tag khỏi liên hệ.
/// </summary>
public record RemoveContactTagCommand(Guid ContactId, string TagName) : IRequest<bool>;

/// <summary>
/// EN: Command to update contact attributes.
/// VI: Command để cập nhật thuộc tính liên hệ.
/// </summary>
public record UpdateContactAttributesCommand(
    Guid ContactId,
    Dictionary<string, object> Attributes
) : IRequest<bool>;
