44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using Manager.DTOs;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
|
|
|
|
namespace ManagerService.Data.SubSection
|
|
{
|
|
/// <summary>
|
|
/// Section Pdf
|
|
/// </summary>
|
|
public class SectionPdf : Section
|
|
{
|
|
[Required]
|
|
public List<OrderedTranslationAndResource> PDFOrderedTranslationAndResources { get; set; } // All json files for all languages
|
|
|
|
public PdfDTO ToDTO()
|
|
{
|
|
return new PdfDTO()
|
|
{
|
|
id = Id,
|
|
label = Label,
|
|
title = Title.OrderBy(t => t.Language).Select(l => l.ToDTO()).ToList(),
|
|
description = Description.OrderBy(d => d.Language).Select(l => l.ToDTO()).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,
|
|
pdfs = PDFOrderedTranslationAndResources.Select(otar => otar.ToDTO()).ToList()
|
|
};
|
|
}
|
|
}
|
|
}
|