From 6c019947d5a5032b512cd9eedd70fa72ab8bc0b8 Mon Sep 17 00:00:00 2001 From: oistig Date: Thu, 12 Mar 2026 15:26:04 +0100 Subject: [PATCH] =?UTF-8?q?Mod=C3=A8les=20User=20et=20Role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Knots/Models/Role.cs | 5 ++++- Knots/Models/User.cs | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Knots/Models/Role.cs b/Knots/Models/Role.cs index dd21184..3f8d3a4 100644 --- a/Knots/Models/Role.cs +++ b/Knots/Models/Role.cs @@ -1,6 +1,9 @@ +using System.ComponentModel.DataAnnotations; + namespace Knots.Models; public class Role { - + public int Id { get; set; } + [Required] public string Libelle { get; set; } } \ No newline at end of file diff --git a/Knots/Models/User.cs b/Knots/Models/User.cs index 6b9b0e7..aead80a 100644 --- a/Knots/Models/User.cs +++ b/Knots/Models/User.cs @@ -1,6 +1,14 @@ +using System.ComponentModel.DataAnnotations; + namespace Knots.Models; public class User { - + public int Id { get; set; } + [Required] public string Username { get; set; } + public string? Description {get; set;} + [Required] public string Password { get; set; } + [Required] public string Email { get; set; } + [Required, Length(10, 10)] public string Tel { get; set; } + public string? ProfilePicture { get; set; } } \ No newline at end of file