This commit is contained in:
Eugenio Chiodo
2021-04-26 15:35:44 +02:00
parent 9182a1051c
commit f537d097ec
84 changed files with 43538 additions and 0 deletions

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace drinkMe.Client.Models
{
public class CreditCardForm
{
[Required, Display(Name = "Credit card number"),
MaxLength(16), MinLength(16)]
public string Number { get; set; }
[Required, Display(Name = "Expiration month"),
Range(2, 2), RegularExpression(@"^((0[1-9])|(1[0-2]))$", ErrorMessage = "Invalid month")]
public string ExpirationMonth { get; set; }
[Required, Display(Name = "Expiration year"),
Range(2, 2), RegularExpression(@"^(\d{2})$", ErrorMessage = "Invalid year")]
public string ExpirationYear { get; set; }
[Required, Display(Name = "CVV code"),
Range(3, 3), RegularExpression(@"^(\d{3})$", ErrorMessage = "Invalid CVV code")]
public string CVVCode { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace drinkMe.Client.Models
{
public class DiscountForm
{
[Required,
Display(Name = "Discount code")]
public string DiscountCode { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace drinkMe.Client.Models
{
public enum PaymentMethod
{
Undefined,
Cash,
CreditCard
}
}

View File

@ -0,0 +1,9 @@
namespace drinkMe.Client.Models
{
public enum PurchaseStep
{
ChoosingProducts,
PaymentSetup,
SuccessfulPurchase
}
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>