2025-05-23 17:06:18 +02:00

47 lines
1.3 KiB
C#

using Manager.DTOs;
using ManagerService.DTOs;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace ManagerService.Data.SubSection
{
/// <summary>
/// Section menu
/// </summary>
public class SectionMenu : Section
{
[Required]
public List<Section> MenuSections { get; set; } // All json files for all languages
public MenuDTO ToDTO()
{
return new MenuDTO()
{
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,
//sections = MenuSections.Select(s => s.ToDTO()).ToList()
};
}
}
}