47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using System;
|
|
using Nexius.IdentityProvider.Model.External.V1;
|
|
|
|
namespace Kreta.BusinessLogic.HelperClasses
|
|
{
|
|
[Serializable]
|
|
public class KretaCourseCo
|
|
{
|
|
public KretaCourseCo() { CourseObject = new KretaCourseObjectCo(); }
|
|
|
|
public KretaCourseCo(Course course)
|
|
{
|
|
Id = course.Id;
|
|
Title = course.Title;
|
|
Description = course.Description;
|
|
ImageUrl = course.ImageUrl;
|
|
CreatedAt = course.CreatedAt;
|
|
LaunchUri = course.LaunchUri;
|
|
CourseObject = new KretaCourseObjectCo(course.CourseObject);
|
|
Tags = course.Tags;
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public string Title { get; set; }
|
|
public string Description { get; set; }
|
|
public string ImageUrl { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public string LaunchUri { get; set; }
|
|
public KretaCourseObjectCo CourseObject { get; set; }
|
|
public string Tags { get; set; }
|
|
|
|
public Course ToCourse()
|
|
{
|
|
return new Course
|
|
{
|
|
Id = this.Id,
|
|
Title = this.Title,
|
|
Description = this.Description,
|
|
ImageUrl = this.ImageUrl,
|
|
CreatedAt = this.CreatedAt,
|
|
LaunchUri = this.LaunchUri,
|
|
CourseObject = CourseObject.ToCourseObject(),
|
|
Tags = this.Tags
|
|
};
|
|
}
|
|
}
|
|
}
|