init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Orarend;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Orarend
|
||||
{
|
||||
public class OrarendElemGetRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
public static implicit operator OrarendElemGetRequest(OrarendElemGetRequestDto dto)
|
||||
=> dto == null ? new OrarendElemGetRequestDto() : new OrarendElemGetRequest(dto.OrarendElemUid);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Orarend;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Orarend
|
||||
{
|
||||
public class OrarendElemListRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Záró időpont (UTC ISO 8601), az ebben az időpontban folyamatban lévő órát is vissaadjuk.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DatumIg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Kezdő időpont (UTC ISO 8601), az ebben az időpontban folyamatban lévő órát is vissaadjuk.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
public static implicit operator OrarendElemListRequest(OrarendElemListRequestDto dto) => dto == null ? new OrarendElemListRequestDto() : new OrarendElemListRequest
|
||||
{
|
||||
DatumTol = dto.DatumTol.ToLocalTime(),
|
||||
DatumIg = dto.DatumIg.ToLocalTime()
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Ellenorzo.Domain.VN.Orarend;
|
||||
using Kreta.Ellenorzo.Dto.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Dto.VN.Attributes;
|
||||
using Kreta.Ellenorzo.Dto.VN.Converter;
|
||||
using Kreta.Ellenorzo.Dto.VN.Csatolmany;
|
||||
using Kreta.Ellenorzo.Dto.VN.Documentation;
|
||||
using Kreta.Ellenorzo.Dto.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Dto.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Dto.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Dto.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Dto.VN.Utility;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Newtonsoft.Json;
|
||||
using static Kreta.Ellenorzo.Dto.VN.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dto.VN.Orarend
|
||||
{
|
||||
public class OrarendElemListResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito), JsonConverter(typeof(UidConverter<OrarendElemUidDto>)), SwaggerChangeType(typeof(string))]
|
||||
public OrarendElemUidDto Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasDatumaShortDateTime + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => esemény napja")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanoraKezdetenekIdopontja + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => esemény kezdő dátum")]
|
||||
public DateTime KezdetIdopont { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanoraVegenekIdopontja + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => esemény végdátum")]
|
||||
public DateTime VegIdopont { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanevRendjeEsemenyNeveVagyTantargyNeve)]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitasOraszamaAzAdottNapon + "; " +
|
||||
DescriptionLookUp.NapirendiOraEsetenNull +
|
||||
"<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public int? Oraszam { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.OraEvesSorszama)]
|
||||
public int? OraEvesSorszama { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettOsztalyCsoport + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public OsztalyCsoportResponseDto OsztalyCsoport { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanarNeve + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string TanarNeve { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettTantargy +
|
||||
"<br>Ha ki van töltve a tantárgy rövid neve, akkor az kerül bele, egyébként a teljes neve;" +
|
||||
"<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public TantargyResponseDto Tantargy { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitasTemaja +
|
||||
"A tanárnak naplózás esetén kötelező megadnia;" +
|
||||
"Nem naplózott óra esetén, tanévrendje esemény esetén vagy ha a testreszabásban le van tiltva a téma láthatósága => null")]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettTeremNeve + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string TeremNeve { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasTipusa)]
|
||||
public AdatszotarResponseDto<CalendarOraTypeEnum> Tipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanuloiJelenlet)]
|
||||
public AdatszotarResponseDto<MulasztasTipus> TanuloJelenlet { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasAllapota)]
|
||||
public AdatszotarResponseDto<TanoraAllapotaEnum> Allapot { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HelyettesTanarNeve + "<br>Ha " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string HelyettesTanarNeve { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HaziFeladatUid + ";<br>Ha az órához nem rögzítettek vagy " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string HaziFeladatUid { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.OraiFeladatUid + ";<br>Ha az órához nem rögzítettek vagy " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string FeladatGroupUid { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.NyelviFeladatUid + ";<br>Ha az órához nem rögzítettek vagy " + nameof(Tipus) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string NyelviFeladatGroupUid { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.OrahozRogzitettBejelentettSzamonkeresekUid)]
|
||||
public string BejelentettSzamonkeresUid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.IsTanuloIrhatKommentet)]
|
||||
public bool IsTanuloHaziFeladatEnabled { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.HaziFeladatMegoldva)]
|
||||
public bool IsHaziFeladatMegoldva { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.CsatolmanyokOrahoz)]
|
||||
public IEnumerable<CsatolmanySimplifiedResponseDto> Csatolmanyok { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.IsDigitalisOra)]
|
||||
public bool IsDigitalisOra { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.DigitalisEszkozTipus)]
|
||||
public string DigitalisEszkozTipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.DigitalisPlatformTipus)]
|
||||
public string DigitalisPlatformTipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.DigitalisTamogatoEszkozTipusList)]
|
||||
public List<string> DigitalisTamogatoEszkozTipusList { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Letrehozas)]
|
||||
public DateTime Letrehozas { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.UtolsoModositas)]
|
||||
public DateTime UtolsoModositas { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"ListOrarend",
|
||||
new OrarendElemListRequestDto
|
||||
{
|
||||
DatumTol = new DateTime(2021, 3, 21, 0, 0, 0),
|
||||
DatumIg = new DateTime(2021, 3, 30, 0, 0, 0)
|
||||
});
|
||||
|
||||
public static implicit operator OrarendElemListResponseDto(OrarendElemListResponse model) => new OrarendElemListResponseDto
|
||||
{
|
||||
Uid = model.Uid,
|
||||
Datum = model.Uid.Datum.ToIso8601Utc(),
|
||||
KezdetIdopont = model.KezdetIdopont.ToIso8601Utc(),
|
||||
VegIdopont = model.VegIdopont.ToIso8601Utc(),
|
||||
Nev = model.Nev,
|
||||
Oraszam = model.Oraszam > -1 ? model.Oraszam : null,
|
||||
OraEvesSorszama = model.OraEvesSorszama,
|
||||
OsztalyCsoport = model?.OsztalyCsoport,
|
||||
TanarNeve = model.OratTartoTanar?.Nev,
|
||||
Tantargy = model?.Tantargy,
|
||||
Tema = model.Tema,
|
||||
TeremNeve = model.Terem?.Nev,
|
||||
Tipus = AdatszotarResponseDto<CalendarOraTypeEnum>.Create(model.Uid.Tipus),
|
||||
TanuloJelenlet = AdatszotarResponseDto<MulasztasTipus>.Create(model.TanuloJelenlet),
|
||||
Allapot = AdatszotarResponseDto<TanoraAllapotaEnum>.Create(model.Allapot),
|
||||
HelyettesTanarNeve = model.HelyettesTanar?.Nev,
|
||||
HaziFeladatUid = model.HaziFeladatUid?.UidRaw,
|
||||
FeladatGroupUid = model.FeladatGroupUid?.UidRaw,
|
||||
NyelviFeladatGroupUid = model.NyelviFeladatGroupUid?.UidRaw,
|
||||
BejelentettSzamonkeresUid = model.BejelentettSzamonkeresUid?.UidRaw,
|
||||
IsTanuloHaziFeladatEnabled = model.IsTanuloHaziFeladatEnabled,
|
||||
IsHaziFeladatMegoldva = model.IsHaziFeladatMegoldva,
|
||||
Csatolmanyok = ModelToDto(model.Csatolmanyok),
|
||||
IsDigitalisOra = model.IsDigitalisOra,
|
||||
DigitalisEszkozTipus = model.DigitalisEszkozTipus,
|
||||
DigitalisPlatformTipus = model.DigitalisPlatformTipus,
|
||||
DigitalisTamogatoEszkozTipusList = model.DigitalisTamogatoEszkozTipusList,
|
||||
Letrehozas = model.Letrehozas,
|
||||
UtolsoModositas = model.UtolsoModositas
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue