case 4504
This commit is contained in:
@@ -22,6 +22,10 @@ namespace Sockeye.Models
|
|||||||
public DateTime ExpireDate { get; set; }
|
public DateTime ExpireDate { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public int Quantity { get; set; } = 1;
|
public int Quantity { get; set; } = 1;
|
||||||
|
[Required]
|
||||||
|
public string OriginalOrderNumber { get; set; }//first order number for ref
|
||||||
|
[Required]
|
||||||
|
public DateTime OriginalOrderDate { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Subscription Subscription { get; set; }
|
public Subscription Subscription { get; set; }
|
||||||
|
|||||||
@@ -1505,31 +1505,39 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
//SUBSCRIPTIONITEM
|
//SUBSCRIPTIONITEM
|
||||||
await ExecQueryAsync("CREATE TABLE asubscriptionitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, subscriptionid BIGINT NOT NULL REFERENCES asubscription ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE asubscriptionitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, subscriptionid BIGINT NOT NULL REFERENCES asubscription ON DELETE CASCADE, "
|
||||||
+ "productid BIGINT REFERENCES aproduct(id), active BOOL NOT NULL, expiredate TIMESTAMPTZ NOT NULL, quantity INTEGER NOT NULL DEFAULT 1 )");
|
+ "productid BIGINT REFERENCES aproduct(id), active BOOL NOT NULL, originalordernumber TEXT NOT NULL, originalorderdate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ NOT NULL, quantity INTEGER NOT NULL DEFAULT 1 )");
|
||||||
|
|
||||||
//english translations
|
//english translations
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'en'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'en'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'en'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'en'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderNumber', 'Original order #' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderDate', 'Original order date' FROM atranslation t where t.baselanguage = 'en'");
|
||||||
|
|
||||||
//spanish translations
|
//spanish translations
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'es'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'es'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'es'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'es'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderNumber', 'Original order #' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderDate', 'Original order date' FROM atranslation t where t.baselanguage = 'es'");
|
||||||
|
|
||||||
//french translations
|
//french translations
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'fr'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'fr'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'fr'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'fr'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderNumber', 'Original order #' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderDate', 'Original order date' FROM atranslation t where t.baselanguage = 'fr'");
|
||||||
|
|
||||||
//german translations
|
//german translations
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'de'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'Subscription', 'Subscription' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'de'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionItemList', 'Items' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'de'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubscriptionList', 'Subscriptions' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'de'");
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'SubSite', 'Sub-site' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderNumber', 'Original order #' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
|
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'OriginalOrderDate', 'Original order date' FROM atranslation t where t.baselanguage = 'de'");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
8
todo.txt
8
todo.txt
@@ -20,6 +20,14 @@ TODO:
|
|||||||
- expires
|
- expires
|
||||||
- active
|
- active
|
||||||
|
|
||||||
|
TODO: get subscriptions populated and accurate?!
|
||||||
|
could read licenses maybe?
|
||||||
|
|
||||||
|
TODO: dashboard items related to subscriptions
|
||||||
|
- revenue per month for next 12 months graph
|
||||||
|
- overdue expired subs list
|
||||||
|
- active count of each product subscription bar graph
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Database: sockeye
|
-- Database: sockeye
|
||||||
|
|||||||
Reference in New Issue
Block a user