init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class HetirendListRequestDto
|
||||
{
|
||||
[Required]
|
||||
public DateTime OrarendElemKezdoNapDatuma { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime OrarendElemVegNapDatuma { get; set; }
|
||||
|
||||
public static implicit operator HetirendListRequest(HetirendListRequestDto dto) => new HetirendListRequest
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = dto.OrarendElemKezdoNapDatuma.ToLocalTime(),
|
||||
OrarendElemVegNapDatuma = dto.OrarendElemVegNapDatuma.ToLocalTime()
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Utility;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class HetirendListResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required, Description("Az entitás kezdő napja")]
|
||||
public DateTime KezdoNapDatuma { get; set; }
|
||||
|
||||
[Required, Description("Az entitás végének napja")]
|
||||
public DateTime VegNapDatuma { get; set; }
|
||||
|
||||
[Required, Description("A hét sorszáma a tanév kezdetétől számítva")]
|
||||
public int HetSorszama { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Hetirend)]
|
||||
public string Hetirend { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"ListHetirend",
|
||||
new HetirendListRequestDto
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = new DateTime(2022, 05, 09, 0, 0, 0),
|
||||
OrarendElemVegNapDatuma = new DateTime(2022, 05, 16, 0, 0, 0)
|
||||
});
|
||||
|
||||
public static implicit operator HetirendListResponseDto(HetirendListResponse model) => new HetirendListResponseDto
|
||||
{
|
||||
Id = model.Id,
|
||||
KezdoNapDatuma = model.KezdoNapDatuma.ToIso8601Utc(),
|
||||
VegNapDatuma = model.VegNapDatuma.ToIso8601Utc(),
|
||||
HetSorszama = model.HetSorszama,
|
||||
Hetirend = model.Hetirend
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class MulasztasForOraNaplozasRequestDto
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.MulasztasTipus)]
|
||||
public int Tipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.Keses)]
|
||||
public int? Keses { get; set; }
|
||||
|
||||
public static implicit operator MulasztasForOraNaplozasRequest(MulasztasForOraNaplozasRequestDto dto) => new MulasztasForOraNaplozasRequest
|
||||
{
|
||||
Tipus = (MulasztasTipusEnum)dto.Tipus,
|
||||
Keses = dto.Keses
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.UniqueIdentifier;
|
||||
using Kreta.Naplo.Dto.V3.Converter;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class OraNaplozasRequestDto
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.OrarendElemUid)]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Tema)]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.IsElmaradt)]
|
||||
public bool IsElmaradt { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanuloLista)]
|
||||
public List<TanuloForOraNaplozasListRequestDto> TanuloLista { get; set; } = new List<TanuloForOraNaplozasListRequestDto>();
|
||||
|
||||
[Description(DescriptionLookUp.HaziFeladatSzoveg)]
|
||||
public string Hazifeladat { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HaziFeladatHatarido)]
|
||||
public DateTime? HazifeladatHatarido { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HaziFeladatId)]
|
||||
public int? HazifeladatId { get; set; }
|
||||
|
||||
public static implicit operator OraNaplozasRequest(OraNaplozasRequestDto model) => new OraNaplozasRequest
|
||||
(
|
||||
new OrarendElemUid(model.OrarendElemUid),
|
||||
model.Tema,
|
||||
model.IsElmaradt,
|
||||
RequestModelConverter.DtoToModel(model.TanuloLista),
|
||||
CommonUtils.ReplaceNewLineToHtmlTag(model.Hazifeladat),
|
||||
model.HazifeladatHatarido?.ToLocalTime(),
|
||||
model.HazifeladatId
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class OraNaplozasTorlesRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
public static implicit operator OraNaplozasTorlesRequest(OraNaplozasTorlesRequestDto dto)
|
||||
=> dto == null ? new OraNaplozasTorlesRequestDto() : new OraNaplozasTorlesRequest(dto.OrarendElemUid);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class OrarendElemRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
public static implicit operator OrarendElemRequest(OrarendElemRequestDto dto)
|
||||
=> dto == null ? new OrarendElemRequestDto() : new OrarendElemRequest(dto.OrarendElemUid);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Utility;
|
||||
using Kreta.Naplo.Dto.V3.Attributes;
|
||||
using Kreta.Naplo.Dto.V3.Converter;
|
||||
using Kreta.Naplo.Dto.V3.Csatolmany;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
using Kreta.Naplo.Dto.V3.UniqueIdentifier;
|
||||
using Newtonsoft.Json;
|
||||
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class OrarendElemResponseDto : IDtoListDocumentation, IDtoDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.ResponseModelEgyediAzonosito), JsonConverter(typeof(UidConverter<OrarendElemUidDto>)), SwaggerChangeType(typeof(string))]
|
||||
public OrarendElemUidDto Uid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitashozRogzitettNev +
|
||||
"<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(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => tanév rendje neve")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.HasOrarendiOra)]
|
||||
public bool HasOrarendiOra { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasTipusa)]
|
||||
public int Tipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettOsztalyCsoportId + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettOsztalyCsoportNev + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettTantargyId +
|
||||
"<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettTantargyNev +
|
||||
"<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(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.EntitashozRogzitettTeremNeve + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string Terem { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanoraKezdetenekIdopontja + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => esemény kezdő dátum")]
|
||||
public DateTime Kezdete { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanoraVegenekIdopontja + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => esemény végdátum")]
|
||||
public DateTime Vege { 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.EntitasOraszamaAzAdottNapon + "; " +
|
||||
DescriptionLookUp.NapirendiOraEsetenNull +
|
||||
"<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public int? Oraszam { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EntitasAllapota)]
|
||||
public int Allapot { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.OratulajdonosTanarUid + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public Guid TanarUid { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.OratulajdonosTanarNev + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string TanarNev { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HelyettesTanarUid + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public Guid? HelyettesitoTanarUid { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HelyettesTanarNev + "<br>Ha " + nameof(CalendarOraTypeEnum) + " == " + nameof(CalendarOraTypeEnum.TanevRendjeEsemeny) + " => null")]
|
||||
public string HelyettesitoTanarNev { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.EvesOraSorszam)]
|
||||
public int? EvesOraSorszam { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.HaziFeladatId)]
|
||||
public int? HaziFeladatId { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.BejelentettSzamonkeresId)]
|
||||
public int? BejelentettSzamonkeresId { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.BejelentettSzamonkeresMod)]
|
||||
public string BejelentettSzamonkeresMod { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.BejelentettSzamonkeresTema)]
|
||||
public string BejelentettSzamonkeresTema { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.CsatolmanyokOrahoz)]
|
||||
public IEnumerable<CsatolmanyResponseDto> Csatolmanyok { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.ElozoNaplozottOraDatum)]
|
||||
public DateTime? ElozoNaplozottOraDatum { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.ElozoNaplozottOraTema)]
|
||||
public string ElozoNaplozottOraTema { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Naplozart)]
|
||||
public bool Naplozart{ get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"GetOrarend",
|
||||
new OrarendRequestDto
|
||||
{
|
||||
DatumTol = new DateTime(2022, 2, 14, 0, 0, 0),
|
||||
DatumIg = new DateTime(2022, 2, 20, 0, 0, 0)
|
||||
});
|
||||
|
||||
public DocumentationExampleDto Example
|
||||
=> new DocumentationExampleDto(
|
||||
"GetOrarendElem",
|
||||
new OrarendElemRequestDto
|
||||
{
|
||||
OrarendElemUid = "13279465,TanitasiOra,2022-02-22T23:00:00Z"
|
||||
});
|
||||
|
||||
public static implicit operator OrarendElemResponseDto(OrarendElemResponse model) => new OrarendElemResponseDto
|
||||
{
|
||||
Uid = model.Uid,
|
||||
Nev = model.Nev,
|
||||
HasOrarendiOra = model.HasOrarendiOra,
|
||||
Tipus = (int)model.Uid.Tipus,
|
||||
OsztalyCsoportId = model.OsztalyCsoportId,
|
||||
OsztalyCsoportNev = model.OsztalyCsoportNev,
|
||||
TantargyId = model.TantargyId,
|
||||
TantargyNev = model.TantargyNev,
|
||||
Terem = model.Terem,
|
||||
Kezdete = model.Kezdete.ToIso8601Utc(),
|
||||
Vege = model.Vege.ToIso8601Utc(),
|
||||
Tema = model.Tema,
|
||||
Oraszam = model.Oraszam,
|
||||
Allapot = model.Allapot,
|
||||
TanarUid = model.TanarUid,
|
||||
TanarNev = model.TanarNev,
|
||||
HelyettesitoTanarUid = model.HelyettesitoTanarUid,
|
||||
HelyettesitoTanarNev = model.HelyettesitoTanarNev,
|
||||
EvesOraSorszam = model.EvesOraSorszam,
|
||||
HaziFeladatId = model.HaziFeladatId,
|
||||
BejelentettSzamonkeresId = model.BejelentettSzamonkeresId,
|
||||
BejelentettSzamonkeresMod = model.BejelentettSzamonkeresMod,
|
||||
BejelentettSzamonkeresTema = model.BejelentettSzamonkeresTema,
|
||||
Csatolmanyok = ModelToDto(model.Csatolmanyok),
|
||||
ElozoNaplozottOraDatum = model.ElozoNaplozottOraDatum?.ToIso8601Utc(),
|
||||
ElozoNaplozottOraTema = model.ElozoNaplozottOraTema,
|
||||
Naplozart = model.Naplozart
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class OrarendRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Dátum intervallum kezdete (UTC ISO 8601, másodperc pontossággal)
|
||||
/// </summary>
|
||||
[Required, Description(DescriptionLookUp.DatumTol)]
|
||||
public DateTime DatumTol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dátum intervallum vége (UTC ISO 8601, másodperc pontossággal)
|
||||
/// </summary>
|
||||
[Required, Description(DescriptionLookUp.DatumIg)]
|
||||
public DateTime DatumIg { get; set; }
|
||||
|
||||
public static implicit operator OrarendRequest(OrarendRequestDto model) => new OrarendRequest(model.DatumTol.ToLocalTime(), model.DatumIg.ToLocalTime());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using Swashbuckle.Examples;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class SzamonkeresRequestDto : IExamplesProvider
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.OrarendElemUid)]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.ErtekelesMod)]
|
||||
public int ErtekelesMod { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.Tema)]
|
||||
public string Tema { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.ForceSave)]
|
||||
public bool ForceSave { get; set; }
|
||||
|
||||
public static implicit operator SzamonkeresRequest(SzamonkeresRequestDto dto) => new SzamonkeresRequest(dto.OrarendElemUid)
|
||||
{
|
||||
ErtekelesMod = dto.ErtekelesMod,
|
||||
Tema = dto.Tema,
|
||||
ForceSave = dto.ForceSave
|
||||
};
|
||||
|
||||
public object GetExamples() => new SzamonkeresRequestDto
|
||||
{
|
||||
OrarendElemUid = "813423,OrarendiOra,2022-10-06T22:00:00Z",
|
||||
ErtekelesMod = 1507,
|
||||
Tema = "Doga lesz, készüljetek!",
|
||||
ForceSave = false
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class TanuloForOraNaplozasListRequestDto
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.TanuloId)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.Mulasztas)]
|
||||
public MulasztasForOraNaplozasRequestDto Mulasztas { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.FeljegyzesTipusLista)]
|
||||
public List<int> FeljegyzesTipusLista { get; set; } = new List<int>();
|
||||
|
||||
public static implicit operator TanuloForOraNaplozasListRequest(TanuloForOraNaplozasListRequestDto model) => new TanuloForOraNaplozasListRequest
|
||||
{
|
||||
Id = model.Id,
|
||||
Mulasztas = model.Mulasztas,
|
||||
FeljegyzesTipusLista = model.FeljegyzesTipusLista
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class TanuloJelenletRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string OrarendElemUid { get; set; }
|
||||
|
||||
public static implicit operator TanuloJelenletRequest(TanuloJelenletRequestDto dto)
|
||||
=> dto == null ? new TanuloJelenletRequestDto() : new TanuloJelenletRequest(dto.OrarendElemUid);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.Orarend
|
||||
{
|
||||
public class TanuloJelenletResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.TanuloId)]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.MulasztasTipus)]
|
||||
public int Allapot { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.MulasztasTipus)]
|
||||
public int MulasztasTipus { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.Keses)]
|
||||
public int? Keses { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanuloNaplozasFelkialtojelSzoveg)]
|
||||
public string Szoveg { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.HasMulasztasGomb)]
|
||||
public bool HasMulasztasGomb { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"GetJelenlet",
|
||||
new TanuloJelenletRequestDto
|
||||
{
|
||||
OrarendElemUid = "13279471,TanitasiOra,2022-02-27T23:00:00Z"
|
||||
});
|
||||
|
||||
public static implicit operator TanuloJelenletResponseDto(TanuloJelenletResponse model) => new TanuloJelenletResponseDto
|
||||
{
|
||||
TanuloId = model.TanuloId,
|
||||
Allapot = model.Allapot,
|
||||
MulasztasTipus = model.MulasztasTipus,
|
||||
Keses = model.Keses,
|
||||
Szoveg = model.Szoveg,
|
||||
HasMulasztasGomb = model.HasMulasztasGomb,
|
||||
};
|
||||
|
||||
public object GetExamples() => new TanuloJelenletResponseDto
|
||||
{
|
||||
TanuloId = 218789,
|
||||
Allapot = 1827,
|
||||
MulasztasTipus = 1827,
|
||||
Szoveg = "Előző órán hiányzott",
|
||||
HasMulasztasGomb = true,
|
||||
Keses = null
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue