48 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 slider
/// </summary>
public class SectionSlider : Section
{
[Required]
[Column(TypeName = "jsonb")]
public List<ContentDTO> SliderContents { get; set; } // TODO check
public SliderDTO ToDTO()
{
return new SliderDTO()
{
id = Id,
label = Label,
title = Title,
description = Description,
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,
contents = SliderContents,
};
}
}
}