Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Courses;
|
||||
|
||||
public class CreateCourseDto
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid CreatorId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using MetaCourse.Api.DTOs.Topics;
|
||||
|
||||
namespace MetaCourse.Api.DTOs.Courses;
|
||||
|
||||
public class GetCourseDetailsDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public string CreatorName { get; set; } = string.Empty;
|
||||
public Guid CreatorId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
public List<GetTopicDto> Topics { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using MetaCourse.Api.Entities;
|
||||
|
||||
namespace MetaCourse.Api.DTOs.Courses;
|
||||
|
||||
public class GetCourseDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public string CreatorName { get; set; } = string.Empty;
|
||||
public Guid CreatorId { get; set; }
|
||||
public int TopicCount { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Courses;
|
||||
|
||||
public class UpdateCourseDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace MetaCourse.Api.DTOs.Progress;
|
||||
|
||||
public class CourseProgressDto
|
||||
{
|
||||
public Guid CourseId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public int TotalTopics { get; set; }
|
||||
public int CompletedTopics { get; set; }
|
||||
public int TotalResources { get; set; }
|
||||
public int CompletedResources { get; set; }
|
||||
public double ProgressPercentage { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Progress;
|
||||
|
||||
public class MarkResourceProgressDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid ResourceId { get; set; }
|
||||
public bool Completed { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Progress;
|
||||
|
||||
public class MarkTopicProgressDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid TopicId { get; set; }
|
||||
public bool Completed { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using MetaCourse.Api.Entities;
|
||||
|
||||
namespace MetaCourse.Api.DTOs.Resources;
|
||||
|
||||
public class CreateResourceDto
|
||||
{
|
||||
public ResourceType Type { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace MetaCourse.Api.DTOs.Resources;
|
||||
|
||||
public class GetResourceDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Content { get; set; } = string.Empty;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using MetaCourse.Api.Entities;
|
||||
|
||||
namespace MetaCourse.Api.DTOs.Resources;
|
||||
|
||||
public class UpdateResourceDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public ResourceType Type { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MetaCourse.Api.DTOs.Topics;
|
||||
|
||||
public class CreateTopicDto
|
||||
{
|
||||
public Guid CourseId { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public int Position { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MetaCourse.Api.DTOs.Resources;
|
||||
|
||||
namespace MetaCourse.Api.DTOs.Topics;
|
||||
|
||||
public class GetTopicDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public int Position { get; set; }
|
||||
public Guid CourseId { get; set; }
|
||||
public List<GetResourceDto> Resources { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MetaCourse.Api.DTOs.Topics;
|
||||
|
||||
public class UpdateTopicDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public int Position { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace MetaCourse.Api.DTOs.UserCourses;
|
||||
|
||||
public class EnrollDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid CourseId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace MetaCourse.Api.DTOs.UserCourses;
|
||||
|
||||
public class GetEnrollmentDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid CourseId { get; set; }
|
||||
public string CourseTitle { get; set; } = string.Empty;
|
||||
public DateTime EnrolledAt { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MetaCourse.Api.DTOs.Users;
|
||||
|
||||
public class GetUserDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Users;
|
||||
|
||||
public class LoginResponseDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace MetaCourse.Api.DTOs.Users;
|
||||
|
||||
public class LoginUserDto
|
||||
{
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MetaCourse.Api.DTOs.Users;
|
||||
|
||||
public class RegisterUserDto
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user