This commit is contained in:
elias
2023-08-06 23:12:45 +02:00
parent c8242217a5
commit 3c22d881ae
7 changed files with 222 additions and 8 deletions

55
Nevyn/Models/Budget.cs Normal file
View File

@@ -0,0 +1,55 @@
using System;
using MySql.Data.MySqlClient;
namespace Nevyn.Models
{
public class Budget
{
public int Id { get; set; }
public List<Category> Categories { get; set; }
public Budget()
{
}
//public void getBudgetFromSQL()
//this = Classes.Mysql.getBudget();
//}
public void updateFromDatabase()
{
Classes.Mysql mysql = new Classes.Mysql();
this.Categories = mysql.getBudgetCategories();
}
}
public class Category
{
public int ID { get; set; }
public string? Name { get; set; }
public int parent { get; set; }
public List<BudgetItem> Items { get; set; }
}
public class BudgetItem
{
public int ID { get; set; }
public string? Name { get; set; }
//public user User { get; set; }
public int Amount { get; set; }
public string? Description { get; set; }
public bool Recurring { get; set; }
public int Month { get; set; }
public int Year { get; set; }
}
public class BudgetDTO
{
public List<Category> Categories { get; set; }
public string Debug { get; set; }
}
}