hallo
This commit is contained in:
45
Desktop/hallo/LEA/Models/Application.cs
Normal file
45
Desktop/hallo/LEA/Models/Application.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LEA.Models;
|
||||
|
||||
public class Application
|
||||
{
|
||||
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 = "Letzte Aktualisierung")]
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[Required]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Benutzer")]
|
||||
public ApplicationUser? User { get; set; }
|
||||
|
||||
[Display(Name = "Ansprechpartner")]
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
18
Desktop/hallo/LEA/Models/ApplicationStatus.cs
Normal file
18
Desktop/hallo/LEA/Models/ApplicationStatus.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LEA.Models;
|
||||
|
||||
public enum ApplicationStatus
|
||||
{
|
||||
[Display(Name = "Beworben")]
|
||||
Applied,
|
||||
|
||||
[Display(Name = "Interview")]
|
||||
Interview,
|
||||
|
||||
[Display(Name = "Angebot")]
|
||||
Offer,
|
||||
|
||||
[Display(Name = "Abgelehnt")]
|
||||
Rejected
|
||||
}
|
15
Desktop/hallo/LEA/Models/ApplicationUser.cs
Normal file
15
Desktop/hallo/LEA/Models/ApplicationUser.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace LEA.Models;
|
||||
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
[Required(ErrorMessage = "Bitte geben Sie Ihren vollständigen Namen an.")]
|
||||
[StringLength(100, ErrorMessage = "Der Name darf maximal {1} Zeichen lang sein.")]
|
||||
[Display(Name = "Vollständiger Name")]
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
|
||||
[Display(Name = "Registriert am")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
24
Desktop/hallo/LEA/Models/Contact.cs
Normal file
24
Desktop/hallo/LEA/Models/Contact.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LEA.Models;
|
||||
|
||||
public class Contact
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[StringLength(100, ErrorMessage = "Der Name darf maximal {1} Zeichen lang sein.")]
|
||||
[Display(Name = "Name")]
|
||||
public string? FullName { get; set; }
|
||||
|
||||
[EmailAddress(ErrorMessage = "Bitte eine gültige E-Mail-Adresse eingeben.")]
|
||||
[Display(Name = "E-Mail")]
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Phone(ErrorMessage = "Bitte eine gültige Telefonnummer eingeben.")]
|
||||
[Display(Name = "Telefon")]
|
||||
public string? Phone { get; set; }
|
||||
|
||||
public int ApplicationId { get; set; }
|
||||
|
||||
public Application Application { get; set; } = null!;
|
||||
}
|
9
Desktop/hallo/LEA/Models/ErrorViewModel.cs
Normal file
9
Desktop/hallo/LEA/Models/ErrorViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LEA.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user