Renvoit du rôle au frontend avec Get Login (UPDATE-DATABASE)

This commit is contained in:
MarcEricMartel
2022-11-01 10:33:08 -07:00
parent 5112762ac9
commit cd37fd2c15
16 changed files with 761 additions and 125 deletions

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace GrossesMitainesAPI.Models;
public class AddressModel {
[Key]
public int Id { get; set; }
[Required, Range(1, int.MaxValue)]
public int CivicNumber { get; set; }
public string? Appartment { get; set; }
[Required, MinLength(3), MaxLength(50)]
public string Street { get; set; }
[Required, MinLength(4), MaxLength(50)]
public string City { get; set; }
[Required, MaxLength(3)]
public string Province { get; set; }
[Required, MinLength(4), MaxLength(30)]
public string Country { get; set; }
// Source pour regex: https://stackoverflow.com/questions/15774555/efficient-regex-for-canadian-postal-code-function
[Required, RegularExpression(@"/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i")]
public string PostalCode { get; set; }
}