Move logic out the the class libs

This commit is contained in:
Alex Pedersen
2026-07-30 10:11:54 +02:00
parent 97688542fe
commit 6df185d519
21 changed files with 44 additions and 99 deletions

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class AmountGridModel
{
public string PaymentMethodText { get; set; } = string.Empty;
public decimal Amount { get; set; }
public string AmountText { get; set; } = string.Empty;
}
}

View File

@@ -1,7 +0,0 @@
namespace Pos.Models
{
public class Class1
{
}
}

View File

@@ -0,0 +1,9 @@
namespace Pos.Models;
public enum PaymentMethod
{
Cash,
Card,
GiftCard,
MobilePay
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class BodyModel
{
public ProductModel[] products { get; set; } = Array.Empty<ProductModel>();
public float totalPrice { get; set; }
public float totalVat { get; set; }
public int receiptNumber { get; set; }
public string receiptTime { get; set; } = string.Empty;
public string staff { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class FooterModel
{
public string value { get; set; } = string.Empty;
public PrintStylesModel printStyles { get; set; } = new();
public int textAlignment { get; set; }
public int feedingLines { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class HeaderModel
{
public string value { get; set; } = string.Empty;
public PrintStylesModel printStyles { get; set; } = new();
public int textAlignment { get; set; }
public int feedingLines { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class PosReceipt
{
public string logoBase64 { get; set; } = string.Empty;
public HeaderModel[] header { get; set; } = Array.Empty<HeaderModel>();
public BodyModel bodyModel { get; set; } = new();
public FooterModel[] footer { get; set; } = Array.Empty<FooterModel>();
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class PrintStylesModel
{
public bool fontB { get; set; }
public bool bold { get; set; }
public bool doubleHeight { get; set; }
public bool doubleWidth { get; set; }
public bool underline { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Json
{
public class ProductModel
{
public string product { get; set; } = string.Empty;
public string noOfProduct { get; set; } = string.Empty;
public float price { get; set; }
public float totalPrice { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace Pos.Json
{
public class SaleOfDayModel
{
public DateTime Date { get; set; }
public int TotalCustomers { get; set; }
public decimal TotalSale { get; set; }
public List<SaleOfDayDetail> SaleOfDayDetail { get; set; } = new List<SaleOfDayDetail>();
}
public class SaleOfDayDetail
{
public string Category { get; set; } = string.Empty;
public decimal TotalSale { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class PriceLineModel
{
public string Name { get; set; } = string.Empty;
public int NumberProducts { get; set; }
public decimal Price { get; set; }
public int Id { get; set; }
public bool IsProductGroup { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class SaleGridInternalModel
{
public decimal InternPrice { get; set; }
public int InternPieces { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class SaleGridModel
{
public string Navn { get; set; } = string.Empty;
public string Stk { get; set; } = string.Empty;
public string Pris { get; set; } = string.Empty;
public string Total { get; set; } = string.Empty;
public SaleGridInternalModel SaleGridInternalModel { get; set; } = new();
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class TotalSaleCategory
{
public string Category { get; set; } = string.Empty;
public decimal Sale { get; set; }
public string SaleString { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pos.Models
{
public class TotalSaleDetail
{
public decimal TotalSale { get; set; }
public int TotalCustomer { get; set; }
public List<TotalSaleCategory> TotalSaleCategories { get; set; } = new();
}
}