2025-07-10 16:43:29 +02:00

56 lines
1.6 KiB
C#

using Manager.DTOs;
using ManagerService.DTOs;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace ManagerService.Data.SubSection
{
/// <summary>
/// Section agenda
/// </summary>
public class SectionAgenda : Section
{
[Required]
public bool IsOnlineAgenda { get; set; } = true;
[Required]
[Column(TypeName = "jsonb")]
public List<TranslationDTO> AgendaResourceIds { get; set; } // All json files for all languages
public MapProvider? AgendaMapProvider { get; set; } // Default = Google
[Required]
public List<EventAgenda> EventAgendas { get; set; }
public AgendaDTO ToDTO()
{
return new AgendaDTO()
{
id = Id,
label = Label,
title = Title.ToList(),
description = Description.ToList(),
order = Order,
type = Type,
imageId = ImageId,
imageSource = ImageSource,
configurationId = ConfigurationId,
isSubSection = IsSubSection,
parentId = ParentId,
dateCreation = DateCreation,
instanceId = InstanceId,
isBeacon = IsBeacon,
beaconId = BeaconId,
latitude = Latitude,
longitude = Longitude,
meterZoneGPS = MeterZoneGPS,
resourceIds = AgendaResourceIds,
agendaMapProvider = AgendaMapProvider
};
}
}
}