Ajout de Login et du model réuni avec tout les autres Sujet

This commit is contained in:
2025-10-16 16:30:17 +02:00
parent b3347fe163
commit 2112605cf3
20 changed files with 340 additions and 36 deletions

13
PyroFetes/Models/Login.cs Normal file
View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
public class Login
{
[Key] public int Id { get; set; }
[Required, MaxLength(100)] public string? Username { get; set; }
[Required, MaxLength(200)] public string? FullName { get; set; }
[Required, Length(60, 60)] public string? Password { get; set; }
[Required, Length(24, 24)] public string? Salt { get; set; }
[Required, MaxLength(100)] public string? Role { get; set; }
}

View File

@@ -5,14 +5,13 @@ namespace PyroFetes.Models
public class Product
{
[Key] public int Id { get; set; }
[Required] public int References { get; set; }
[Required, MaxLength(20)] public string? Reference { get; set; }
[Required, MaxLength(100)] public string? Name { get; set; }
[Required] public decimal Duration {get; set;}
[Required] public decimal Caliber { get; set; }
[Required] public int ApprovalNumber { get; set; }
[Required] public decimal Weight { get; set; }
[Required] public decimal Nec { get; set; }
[Required] public decimal SellingPrice { get; set; }
[Required] public string? Image { get; set; }
[Required, MaxLength(200)] public string? Link { get; set; }
[Required] public int MinimalQuantity { get; set; }