hallo
This commit is contained in:
52
Desktop/hallo/LEA/ViewModels/ApplicationFormViewModel.cs
Normal file
52
Desktop/hallo/LEA/ViewModels/ApplicationFormViewModel.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LEA.Models;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace LEA.ViewModels;
|
||||
|
||||
public class ApplicationFormViewModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Bitte geben Sie eine Rolle oder Position an.")]
|
||||
[StringLength(150, ErrorMessage = "Der Titel darf maximal {1} Zeichen lang sein.")]
|
||||
[Display(Name = "Rolle / Position")]
|
||||
public string Role { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Bitte geben Sie ein Unternehmen an.")]
|
||||
[StringLength(150, ErrorMessage = "Der Firmenname darf maximal {1} Zeichen lang sein.")]
|
||||
[Display(Name = "Unternehmen")]
|
||||
public string Company { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(200, ErrorMessage = "Die Quelle darf maximal {1} Zeichen lang sein.")]
|
||||
[Display(Name = "Quelle")]
|
||||
public string? Source { get; set; }
|
||||
|
||||
[Display(Name = "Status")]
|
||||
public ApplicationStatus Status { get; set; } = ApplicationStatus.Applied;
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
[Display(Name = "Beworben am")]
|
||||
public DateTime AppliedOn { get; set; } = DateTime.Today;
|
||||
|
||||
[Display(Name = "Notizen")]
|
||||
[DataType(DataType.MultilineText)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[Display(Name = "Name")]
|
||||
public string? ContactName { get; set; }
|
||||
|
||||
[EmailAddress(ErrorMessage = "Bitte eine gültige E-Mail-Adresse eingeben.")]
|
||||
[Display(Name = "E-Mail")]
|
||||
public string? ContactEmail { get; set; }
|
||||
|
||||
[Phone(ErrorMessage = "Bitte eine gültige Telefonnummer eingeben.")]
|
||||
[Display(Name = "Telefon")]
|
||||
public string? ContactPhone { get; set; }
|
||||
|
||||
public IEnumerable<SelectListItem> StatusOptions { get; set; } = Enumerable.Empty<SelectListItem>();
|
||||
|
||||
public string Heading { get; set; } = string.Empty;
|
||||
|
||||
public string SubmitText { get; set; } = string.Empty;
|
||||
}
|
Reference in New Issue
Block a user