init
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.Naplo.Domain.V3.OsztalyCsoport;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.Dto.V3.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportErtekelesekRequestDto : IExamplesProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Tantárgy id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Osztály/csoport id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dátum (óra vagy értékelés bejegyzés dátuma, ShortDateTime, UTC ISO 8601) opcionális
|
||||
/// </summary>
|
||||
public DateTime? Datum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tanuló id
|
||||
/// </summary>
|
||||
public int? TanuloId { get; set; }
|
||||
|
||||
|
||||
public static implicit operator OsztalyCsoportErtekelesekRequest(OsztalyCsoportErtekelesekRequestDto dto) => new OsztalyCsoportErtekelesekRequest
|
||||
{
|
||||
Datum = dto.Datum ?? DateTime.Now,
|
||||
TantargyId = dto.TantargyId,
|
||||
OsztalyCsoportId = dto.OsztalyCsoportId,
|
||||
TanuloId = dto.TanuloId
|
||||
};
|
||||
|
||||
public object GetExamples() => new OsztalyCsoportErtekelesekRequestDto
|
||||
{
|
||||
TantargyId = 414768,
|
||||
OsztalyCsoportId = 130796
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user