using adas_core.Domain.Enums;
using MongoDB.Bson;

namespace adas_core.Domain.Models.DTO;

public class UpdateUnitIdListDto
{
    public ObjectId UnitId { get; set; }

    public List<MasterListData> MasterListData { get; set; } = [];

    public override string ToString()
    {
        List<string> items = [];

        items.AddRange(MasterListData.Select(masterListData => $", MasterListData: {masterListData}"));


        return "UpdateUnitIdListDto[" + string.Join(", ", items) + "]";
    }
}

public class MasterListData
{
    public ObjectId? MasterListId { get; set; }
    public MasterListType? MasterListType { get; set; }

    public override string ToString()
    {
        List<string> items =
        [
            MasterListId != null ? $"identifier: {MasterListId.ToString()}" : "identifier: Null",
            MasterListType != null ? $"type: {MasterListType.ToString()}" : "type: null"
        ];

        return "[" + string.Join(", ", items) + "]";
    }
}