From dd1ae6a6ba43ec52838a504f2678141d5d123bc7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 29 Dec 2020 20:27:30 +0000 Subject: [PATCH] --- server/AyaNova/models/ServiceBank.cs | 13 ++++--------- server/AyaNova/util/AySchema.cs | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/server/AyaNova/models/ServiceBank.cs b/server/AyaNova/models/ServiceBank.cs index a0f4d274..5637f998 100644 --- a/server/AyaNova/models/ServiceBank.cs +++ b/server/AyaNova/models/ServiceBank.cs @@ -20,8 +20,7 @@ namespace AyaNova.Models [Required] public string Name { get; set; } [Required] - public DateTime EntryDate { get; set; } - [Required] + public DateTime EntryDate { get; set; } public DateTime LastEntryDate { get; set; } [Required] public long ObjectId { get; set; } @@ -34,21 +33,17 @@ namespace AyaNova.Models [Required] public decimal Incidents { get; set; } [Required] - public decimal IncidentsBalance { get; set; } - [Required] + public decimal IncidentsBalance { get; set; } public decimal LastIncidentsBalance { get; set; } [Required] public decimal Currency { get; set; } [Required] - public decimal CurencyBalance { get; set; } - [Required] + public decimal CurencyBalance { get; set; } public decimal LastCurencyBalance { get; set; } - [Required] public decimal Hours { get; set; } [Required] - public decimal HoursBalance { get; set; } - [Required] + public decimal HoursBalance { get; set; } public decimal LastHoursBalance { get; set; } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index afe9e15a..15e18b34 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -381,7 +381,7 @@ BEGIN when 52 then aytable = 'areminder'; when 53 then return 'LT:UnitMeterReading'; when 54 then aytable = 'acustomerservicerequest'; - when 55 then return 'LT:ServiceBank'; + when 55 then aytable = 'aservicebank'; when 56 then return 'LT:OpsNotificationSettings'; when 57 then aytable = 'areport'; when 58 then return 'LT:DashBoardView'; @@ -620,7 +620,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); //SERVICE BANK await ExecQueryAsync("CREATE TABLE aservicebank (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, " + - "entrydate timestamp not null, lastentrydate timestamp not null, objecttype integer not null, objectid bigint not null, sourcetype integer not null, sourceid bigint not null, " + + "entrydate timestamp not null, lastentrydate timestamp, objecttype integer not null, objectid bigint not null, sourcetype integer not null, sourceid bigint not null, " + "incidents decimal(19,4) not null, incidentsbalance decimal(19,4) not null, lastincidentsbalance decimal(19,4), " + "currency decimal(19,4) not null, currencybalance decimal(19,4) not null, lastcurrencybalance decimal(19,4), " + "hours decimal(19,4) not null, hoursbalance decimal(19,4) not null, lasthoursbalance decimal(19,4), "+