This commit is contained in:
Executable
+59
@@ -0,0 +1,59 @@
|
||||
// Reflections of SQL Database objects
|
||||
|
||||
namespace BoredCareers.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 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 string Error { get; set; } = "";
|
||||
}
|
||||
|
||||
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; } // PK
|
||||
public byte[] Image { get; set; } = Array.Empty<byte>();
|
||||
public string Name { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProductInventory {
|
||||
public int AccountID { get; set; } // PK
|
||||
public int ProductID { get; set; } // PK
|
||||
public string Key { get; set; } = string.Empty; // PK
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Cart {
|
||||
public int ID { get; set; } // PK
|
||||
public int AccountID { get; set; }
|
||||
public int ProductID { get; set; }
|
||||
}
|
||||
|
||||
public class Receipt {
|
||||
public int AccountID { get; set; } // PK
|
||||
public int ProductID { get; set; } // PK
|
||||
public string ReceiptID { get; set; } = string.Empty; // PK
|
||||
public int LineItem { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public int TaxAmount { get; set; }
|
||||
public int TotalCost { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user