42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using Manager.DTOs;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
|
|
namespace ManagerService.Data.SubSection
|
|
{
|
|
/// <summary>
|
|
/// Section video
|
|
/// </summary>
|
|
public class SectionVideo : Section
|
|
{
|
|
[Required]
|
|
public string VideoSource { get; set; } // url to resource id (local) or on internet
|
|
|
|
public VideoDTO ToDTO()
|
|
{
|
|
return new VideoDTO()
|
|
{
|
|
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,
|
|
source = VideoSource
|
|
};
|
|
}
|
|
}
|
|
}
|