using Manager.Interfaces.DTO;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Manager.Interfaces.Models
{
///
/// Section Information - Slider
///
public class Slider : Section
{
[BsonElement("Images")]
public List Images { get; set; }
public SliderDTO ToDetailDTO()
{
return new SliderDTO()
{
/*Id = Id,
Label = Label,
Type = Type,
ImageId = ImageId,*/
Images = Images.Select(p => p.ToDTO()).ToList(),
};
}
}
public class Image
{
public string Title { get; set; } // Dictionary with all languages
public string Description { get; set; } // Dictionary with all languages
public string Source { get; set; } // url to ressource id (local) or on internet
public ImageDTO ToDTO()
{
return new ImageDTO()
{
Title = Title,
Description = Description,
Source = Source
};
}
}
}