This commit is contained in:
2023-01-22 02:29:58 +00:00
parent 255d74ae1f
commit f3534e7187
4 changed files with 765 additions and 16 deletions

View File

@@ -12,20 +12,40 @@ namespace Sockeye.Models
public long Id { get; set; }
public uint Concurrency { get; set; }
public long? CustomerId { get; set; }
public long? LicenseId { get; set; }//when licensed will be set to this license id
THINKING ON THIS ONE public bool Licenseable { get; set; } = false;//indicates it is ready for the licensing job to license this purchase (if has no license id)
public long? LicenseId { get; set; }//when null and also when pgroup is a licenseable type means it shoudl be processed by SockBotProcessPurchases license gen
[NotMapped]
public string CustomerViz { get; set; }
[Required]
public long VendorId { get; set; }
[NotMapped]
public string VendorViz { get; set; }
public long? ProductId { get; set; }//optional because a new vendor notification won't have a product set yet also pgroup will be NotSet
public long? ProductId { get; set; }//When null means it's new and should be processed by SockbotProcessPurchases job into proper purchase record
[Required]
public ProductGroup PGroup { get; set; }
[NotMapped]
public string ProductViz { get; set; }
public string SalesOrderNumber { get; set; }
/*
"accounting": {
"currency": "USD",
"product_net": 577.5,
"discount": 0.0,
"product_vat": 75.08,
"shipping": 0.0,
"shipping_vat": 0.0,
"eu_vat": -75.08,
"margin_net": -29.05,
"your_revenue": 548.45
*/
public string Currency { get; set; }//All values sb US dollars, but just in case
public decimal ProductNet { get; set; } = 0;//total billed for the product before taxes
public decimal Discount { get; set; } = 0;
public decimal VendorFee { get; set; } = 0;//margin_net charged by myCommerce; their fee for processing the order
public decimal Revenue { get; set; } = 0;//amount we are paid for the order (product net - discount - vendorfee)
[Required]
public DateTime PurchaseDate { get; set; }
public DateTime? ExpireDate { get; set; }
@@ -35,7 +55,7 @@ namespace Sockeye.Models
public bool RenewNoticeSent { get; set; } = false;
public int Quantity { get; set; } = 1;
public string VendorData { get; set; }
public bool Processed { get; set; } = false;//indicates it was processed from raw vendor data into proper values, false means it should be processed
public bool Processed { get; set; } = false;//indicates it was fully processed and need not be processed by purchase or license generating jobs (all imported data set to processed)
public string Wiki { get; set; }
public List<string> Tags { get; set; }
//workaround for notification