This commit is contained in:
@@ -153,7 +153,7 @@ namespace AyaNova.Biz
|
|||||||
private static async Task DeliverInApp(NotifyEvent ne, AyContext ct)
|
private static async Task DeliverInApp(NotifyEvent ne, AyContext ct)
|
||||||
{
|
{
|
||||||
log.LogTrace($"DeliverInApp deliving notify event: {ne}");
|
log.LogTrace($"DeliverInApp deliving notify event: {ne}");
|
||||||
await ct.Notification.AddAsync(new Notification() { UserId = ne.UserId, AyaType = ne.AyaType, ObjectId = ne.ObjectId, EventType = ne.EventType, NotifySubscriptionId = ne.NotifySubscriptionId, Message = ne.Message });
|
await ct.Notification.AddAsync(new Notification() { UserId = ne.UserId, AyaType = ne.AyaType, ObjectId = ne.ObjectId, EventType = ne.EventType, NotifySubscriptionId = ne.NotifySubscriptionId, Message = ne.Message, Name = ne.Name });
|
||||||
ct.NotifyEvent.Remove(ne);
|
ct.NotifyEvent.Remove(ne);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace AyaNova.Models
|
|||||||
public AyaType? AyaType { get; set; }
|
public AyaType? AyaType { get; set; }
|
||||||
public long? ObjectId { get; set; }
|
public long? ObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
public string Name {get;set;}//object name or closest equivalent for display
|
||||||
|
[Required]
|
||||||
public NotifyEventType EventType { get; set; }
|
public NotifyEventType EventType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public long NotifySubscriptionId { get; set; }
|
public long NotifySubscriptionId { get; set; }
|
||||||
@@ -32,6 +34,7 @@ namespace AyaNova.Models
|
|||||||
{
|
{
|
||||||
Created = DateTime.UtcNow;
|
Created = DateTime.UtcNow;
|
||||||
Fetched = false;
|
Fetched = false;
|
||||||
|
Name=string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
//linked entity
|
//linked entity
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 12;
|
private const int DESIRED_SCHEMA_LEVEL = 12;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 380;
|
internal const long EXPECTED_COLUMN_COUNT = 382;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 139;
|
internal const long EXPECTED_INDEX_COUNT = 139;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
@@ -694,7 +694,7 @@ $BODY$;
|
|||||||
|
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE anotification (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null, " +
|
await ExecQueryAsync("CREATE TABLE anotification (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null, " +
|
||||||
"created timestamp not null, ayatype integer not null, objectid bigint not null, eventtype integer not null, " +
|
"created timestamp not null, ayatype integer not null, objectid bigint not null, name varchar(255) not null, eventtype integer not null, " +
|
||||||
"notifysubscriptionid bigint not null references anotifysubscription(id) on delete cascade, message text, fetched bool not null)");
|
"notifysubscriptionid bigint not null references anotifysubscription(id) on delete cascade, message text, fetched bool not null)");
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE anotifydeliverylog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, processed timestamp not null, " +
|
await ExecQueryAsync("CREATE TABLE anotifydeliverylog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, processed timestamp not null, " +
|
||||||
|
|||||||
Reference in New Issue
Block a user