using UniVerse.Domain.Enums;

namespace UniVerse.Application.DTOs.Users;

public record UserDto(
    int Id,
    string Email,
    string? DisplayName,
    string? AvatarUrl,
    IReadOnlyList<UserRole> Roles,
    bool IsActive,
    int Xp,
    int Coins,
    int Level,
    DateTime CreatedAt
);

public record CurrentUserDto(
    int Id,
    string Email,
    string? DisplayName,
    string? AvatarUrl,
    IReadOnlyList<UserRole> Roles,
    int Xp,
    int Coins,
    int Level,
    DateTime CreatedAt
);

public record UserStatsDto(
    int TotalLectures,
    int AttendedLectures,
    int TotalReviews,
    int Xp,
    int Coins,
    int Level,
    int AchievementsCount,
    int CurrentLevelXp,
    int? NextLevelXp,
    int ActiveEnrollments,
    int EnrollmentSlotLimit,
    IReadOnlyList<EnrollmentSlotRuleDto> EnrollmentSlotRules
);

public record AdminDashboardStatsDto(
    int UsersCount,
    int LecturesCount,
    int EnrollmentsCount,
    int PendingReviewsCount
);

public record EnrollmentSlotRuleDto(int Level, int Slots);

public record CalendarSubscriptionDto(string FeedUrl);

public record UpdateUserRequest(
    string? DisplayName,
    string? AvatarUrl
);

public record UserFilterRequest(
    string? Search,
    UserRole? Role,
    bool? IsActive,
    int Page = 1,
    int PageSize = 20
);

public record StudentProfileDto(
    int Id,
    string? StudentId,
    string? GroupName,
    int? EnrollmentYear,
    string? Faculty,
    string? Specialty
);

public record TeacherProfileDto(
    int Id,
    string? Department,
    string? Title,
    string? Bio
);
