Import shared file

This commit is contained in:
2025-06-16 18:46:19 -07:00
parent 58c384cac3
commit a66077de6a
+119
View File
@@ -0,0 +1,119 @@
using System.Diagnostics;
// Reflections of SQL Database objects
namespace MistoxWebsite.Shared {
public class PageLoadObject {
public Account? user { get; set; }
public AccountClaims? claims { get; set; }
public List<Receipt>? receipts { get; set; }
public List<Product>? products { get; set; }
public List<Cart>? Cart { get; set; }
}
public class DirObj {
public FileType? Type { get; set; }
public string Path { get; set; } = "";
public DirObj? [] Children { get; set; } = new DirObj?[0];
}
public enum FileType {
File,
Directory
}
public class Account {
public int ID { get; set; } // PK
public string UserName { get; set; } = "";
public string Email { get; set; } = "";
public bool EmailVerified { get; set; } = false;
public string PasswordHash { get; set; } = "";
public WebSiteData SiteData { get; set; } = new WebSiteData();
public string Error { get; set; } = "";
}
public class Product {
public int ID { get; set; } // PK
public string Name { get; set; } = "";
public string Description { get; set; } = "";
public int CurShowingIMG = 0;
public List<string> Images { get; set; } = new List<string>();
public int Cost { get; set; }
public string URL { get; set; } = "";
}
public class WebSiteData {
public int AccountID { get; set; } // PK
public bool FailedPasswordLock { get; set; } = false;
public int PasswordAttempts { get; set; } = 5;
public int CurrentPasswordAttempts { get; set; } = 0;
public string Role { get; set; } = "Generic";
public string EmailToken { get; set; } = "";
}
public class AccountInventory {
public int AccountID { get; set; } // PK
public int ProductID { get; set; } // PK
public string Item { get; set; } = string.Empty; // PK
public int Quantity { get; set; }
public string Stats { get; set; } = string.Empty;
}
public class UserInventory {
public string Item { get; set; } = string.Empty;
public int Quantity { get; set; }
public string Stats { get; set; } = string.Empty;
}
public class Receipt {
public int AccountID { get; set; } // PK
public int ProductID { get; set; } // PK
public string ReceiptID { get; set; } = string.Empty;
public int LineItem { get; set; }
public int TaxAmount { get; set; }
public int TotalCost { get; set; }
public DateTime Time { get; set; }
}
public class ReceiptProduct {
public Receipt receipt { get; set; } = new Receipt();
public Product product { get; set; } = new Product();
}
public class Cart {
public int ID { get; set; }
public int AccountID { get; set; }
public int ProductID { get; set; }
}
public class ProjectMistData {
public int AccountID { get; set; } // PK
public int Credits { get; set; }
public int OddballTimer { get; set; }
public string SessionToken { get; set; } = "";
public int SessionID { get; set; }
public int Kills { get; set; }
public int Deaths { get; set; }
}
public class AccountClaims {
public string UserName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string EmailVerified { get; set; } = string.Empty;
public string Role { get; set; } = string.Empty;
public string FailedPasswordLock { get; set; } = string.Empty;
}
public class PaymentObject {
public string CardNumber { get; set; } = string.Empty;
public long ExperationMonth { get; set; }
public long ExperationYear { get; set; }
public string CVC { get; set; } = string.Empty;
public string FullName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Zip { get; set; } = string.Empty;
public List<int> productIDs { get; set; } = new List<int>();
}
}