mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-03 11:33:29 +00:00
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
|
|
using System;
|
||
|
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
|
||
|
|
namespace Api.SeaHavenIndustries.DTOs
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// DTO for POST/PUT requests - Create/Edit Event
|
||
|
|
/// Used to create or update event information
|
||
|
|
/// </summary>
|
||
|
|
public class EditEvent_DTO
|
||
|
|
{
|
||
|
|
public int? Id { get; set; } // Null for create, populated for edit
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "Please enter a title")]
|
||
|
|
[StringLength(100, ErrorMessage = "Title cannot be longer than 100 characters")]
|
||
|
|
public string Title { get; set; } = null!;
|
||
|
|
|
||
|
|
public string? Description { get; set; }
|
||
|
|
|
||
|
|
[StringLength(150, ErrorMessage = "Location cannot be longer than 150 characters")]
|
||
|
|
public string? Location { get; set; }
|
||
|
|
|
||
|
|
public int? RecordID { get; set; }
|
||
|
|
public string? RecordName { get; set; }
|
||
|
|
public string? RecordTargetType { get; set; }
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "The Remind Attendees field is required")]
|
||
|
|
public int ReminderMinutes { get; set; } = 15;
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "The Select a Calendar Color field is required")]
|
||
|
|
public string EventColor { get; set; } = "primary";
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "Please select a start date")]
|
||
|
|
public DateTime StartDate { get; set; }
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "Please select a start time")]
|
||
|
|
public string StartTime { get; set; } = null!;
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "Please select an end date")]
|
||
|
|
public DateTime EndDate { get; set; }
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "Please select an end time")]
|
||
|
|
public string EndTime { get; set; } = null!;
|
||
|
|
|
||
|
|
public bool AllDay { get; set; } = false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|