74 lines
2.6 KiB
C#
Executable File
74 lines
2.6 KiB
C#
Executable File
// Reflections of SQL Database objects
|
|
|
|
namespace MistoxWebsite.Server.Entities {
|
|
|
|
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 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 Product {
|
|
public int ID { get; set; } // PK
|
|
public string Name { get; set; } = "";
|
|
public string Description { get; set; } = "";
|
|
public ProductImage[] Images { get; set; } = [];
|
|
public int Cost { get; set; }
|
|
public string URL { get; set; } = "";
|
|
}
|
|
|
|
public class ProductImage {
|
|
public int ImageID { get; set; } // PK
|
|
public int ProductID { get; set; }
|
|
public byte[] Image { get; set; } = Array.Empty<byte>();
|
|
public string Name { get; set; } = "";
|
|
}
|
|
|
|
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 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 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; } = "";
|
|
}
|
|
|
|
} |