init
This commit is contained in:
+62
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.Domain.V3.Utility;
|
||||
using Kreta.Naplo.Dto.V3.Documentation;
|
||||
using Kreta.Naplo.Dto.V3.Ertekeles;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
using Kreta.Naplo.Dto.V3.Tanulo;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportErtekelesekResponseDto : IDtoListDocumentation
|
||||
{
|
||||
[Required, Description(DescriptionLookUp.TanuloId)]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanuloErtekelesFelmentes)]
|
||||
public TanuloMentessegResponseDto TanuloErtekelesFelmentes { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanuloTantargyiAtlag)]
|
||||
public decimal? TanuloTantargyiAtlag { get; set; }
|
||||
|
||||
[Required, Description(DescriptionLookUp.TanuloErtekelesSzam)]
|
||||
public int TanuloErtekelesSzam { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanuloUtolsoErtekeles)]
|
||||
public ErtekelesResponseDto TanuloUtolsoErtekeles { get; set; }
|
||||
|
||||
[Description(DescriptionLookUp.TanuloUtolsoErtekelesDatum)]
|
||||
public DateTime? TanuloUtolsoErtekelesDatum { get; set; }
|
||||
|
||||
public DocumentationExampleDto ListExample
|
||||
=> new DocumentationExampleDto(
|
||||
"GetOsztalyCsoportErtekelesek",
|
||||
new OsztalyCsoportErtekelesekRequestDto
|
||||
{
|
||||
TantargyId = 414768,
|
||||
OsztalyCsoportId = 130796
|
||||
});
|
||||
|
||||
public static implicit operator OsztalyCsoportErtekelesekResponseDto(OsztalyCsoportErtekelesekResponse model) => new OsztalyCsoportErtekelesekResponseDto
|
||||
{
|
||||
TanuloId = model.TanuloId,
|
||||
TanuloErtekelesFelmentes = model.TanuloErtekelesFelmentes,
|
||||
TanuloTantargyiAtlag = model.TanuloTantargyiAtlag,
|
||||
TanuloErtekelesSzam = model.TanuloErtekelesSzam,
|
||||
TanuloUtolsoErtekeles = model.TanuloUtolsoErtekeles,
|
||||
TanuloUtolsoErtekelesDatum = model.TanuloUtolsoErtekelesDatum?.ToIso8601Utc()
|
||||
};
|
||||
|
||||
public object GetExamples() => new OsztalyCsoportErtekelesekResponseDto
|
||||
{
|
||||
TanuloId = 218789,
|
||||
TanuloErtekelesFelmentes = new TanuloMentessegResponseDto { ErtekelesAloliFelmentes = true, TanoraLatogatasaAloliFelmentes = false, SzovegesenErtekelheto = true },
|
||||
TanuloTantargyiAtlag = (decimal?)4.92,
|
||||
TanuloErtekelesSzam = 21,
|
||||
TanuloUtolsoErtekeles = new ErtekelesResponseDto { OsztalyzatTipus = 1505, Szazalek = null, Szoveg = null },
|
||||
TanuloUtolsoErtekelesDatum = DateTime.Now.ToIso8601Utc()
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user