Mitarbeit bewerten begonnen, Schülerdaten, Gruppen
This commit is contained in:
@@ -85,3 +85,26 @@ public interface ITimeEntryRepository
|
||||
void Save(TimeEntry entry);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
public interface IParticipationSessionRepository
|
||||
{
|
||||
List<ParticipationSession> GetByGroup(Guid groupId);
|
||||
ParticipationSession? GetById(Guid id);
|
||||
void Save(ParticipationSession session);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
public interface IParticipationRepository
|
||||
{
|
||||
List<ParticipationEntry> GetBySession(Guid sessionId);
|
||||
List<ParticipationEntry> GetByStudent(Guid studentId);
|
||||
ParticipationEntry? GetBySessionAndStudent(Guid sessionId, Guid studentId);
|
||||
void Save(ParticipationEntry entry);
|
||||
void SaveMany(List<ParticipationEntry> entries);
|
||||
void DeleteBySession(Guid sessionId);
|
||||
}
|
||||
public interface IParticipationAspectRepository
|
||||
{
|
||||
List<ParticipationAspect> GetDefaults();
|
||||
List<ParticipationAspect> GetByGroup(Guid groupId);
|
||||
void Save(ParticipationAspect aspect);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
namespace LehrerApp.Core.Models;
|
||||
|
||||
public class ParticipationSession
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid GroupId { get; set; }
|
||||
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Today);
|
||||
public Guid? LessonId { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public class ParticipationEntry
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid SessionId { get; set; }
|
||||
public Guid GroupId { get; set; }
|
||||
public Guid StudentId { get; set; }
|
||||
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Today);
|
||||
public List<AspectRating> Ratings { get; set; } = [];
|
||||
public string? Note { get; set; }
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public class AspectRating
|
||||
{
|
||||
public string Key { get; set; } = "";
|
||||
public int Value { get; set; }
|
||||
}
|
||||
|
||||
public class ParticipationAspect
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid? GroupId { get; set; }
|
||||
public string Key { get; set; } = "";
|
||||
public string Label { get; set; } = "";
|
||||
public AspectValueType ValueType { get; set; } = AspectValueType.Scale5;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public int SortOrder { get; set; }
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public enum AspectValueType { Scale5, Scale3, Binary, Points }
|
||||
|
||||
public static class DefaultParticipationAspects
|
||||
{
|
||||
public static readonly IReadOnlyList<ParticipationAspect> All =
|
||||
[
|
||||
new() { Key = "quality", Label = "Qualität", ValueType = AspectValueType.Scale5, SortOrder = 0 },
|
||||
new() { Key = "quantity", Label = "Quantität", ValueType = AspectValueType.Scale5, SortOrder = 1 },
|
||||
new() { Key = "workphase", Label = "Arbeitsphase", ValueType = AspectValueType.Scale5, SortOrder = 2 },
|
||||
];
|
||||
}
|
||||
@@ -16,9 +16,27 @@ public class Student
|
||||
}
|
||||
public class Contact
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = "";
|
||||
public string Relation { get; set; } = "";
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Street { get; set; }
|
||||
public string? PostalCode { get; set; }
|
||||
public string? City { get; set; }
|
||||
public DateOnly? InvalidSince { get; set; }
|
||||
public ContactInvalidReason? InvalidReason { get; set; }
|
||||
public string? InvalidReasonDetails { get; set; }
|
||||
}
|
||||
|
||||
public enum ContactInvalidReason
|
||||
{
|
||||
Moved,
|
||||
NewPhoneNumber,
|
||||
LostCustody,
|
||||
NewEmailAddress,
|
||||
NoLongerResponsible,
|
||||
Other,
|
||||
}
|
||||
|
||||
public enum Gender { M, W, D }
|
||||
|
||||
Reference in New Issue
Block a user