CHECKPOINT COMMIT - POST SERVICE BANK REMOVAL

Service bank feature removed from front, back and e2e testing
mostly commented out in case need to add back again but in some places such as db schema it had to be removed entirely
so refer here if adding back in again
This commit is contained in:
2021-06-04 22:23:21 +00:00
parent c936ff5e3e
commit 59fd41d8d0
27 changed files with 756 additions and 761 deletions

View File

@@ -1,109 +1,109 @@
using System;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
// using System;
// using AyaNova.Biz;
// using System.ComponentModel.DataAnnotations;
// using System.ComponentModel.DataAnnotations.Schema;
// using Newtonsoft.Json;
namespace AyaNova.Models
{
//SERVICEBANK LEDGER
// namespace AyaNova.Models
// {
// //SERVICEBANK LEDGER
//NOTE: following pattern outlined here:
//https://dba.stackexchange.com/a/19368
// //NOTE: following pattern outlined here:
// //https://dba.stackexchange.com/a/19368
public class ServiceBank : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
// public class ServiceBank : ICoreBizObjectModel
// {
// public long Id { get; set; }
// public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
[Required]
public DateTime EntryDate { get; set; }
public DateTime? LastEntryDate { get; set; }
[Required]
public long ObjectId { get; set; }
[Required]
public AyaType AType { get; set; }
[Required]
public long SourceId { get; set; }
[Required]
public AyaType SourceType { get; set; }
[Required]
public decimal Incidents { get; set; }
[Required]
public decimal IncidentsBalance { get; set; }
public decimal? LastIncidentsBalance { get; set; }
[Required]
public decimal Currency { get; set; }
[Required]
public decimal CurrencyBalance { get; set; }
public decimal? LastCurrencyBalance { get; set; }
[Required]
public decimal Hours { get; set; }
[Required]
public decimal HoursBalance { get; set; }
public decimal? LastHoursBalance { get; set; }
// [Required]
// public string Name { get; set; }
// [Required]
// public DateTime EntryDate { get; set; }
// public DateTime? LastEntryDate { get; set; }
// [Required]
// public long ObjectId { get; set; }
// [Required]
// public AyaType AType { get; set; }
// [Required]
// public long SourceId { get; set; }
// [Required]
// public AyaType SourceType { get; set; }
// [Required]
// public decimal Incidents { get; set; }
// [Required]
// public decimal IncidentsBalance { get; set; }
// public decimal? LastIncidentsBalance { get; set; }
// [Required]
// public decimal Currency { get; set; }
// [Required]
// public decimal CurrencyBalance { get; set; }
// public decimal? LastCurrencyBalance { get; set; }
// [Required]
// public decimal Hours { get; set; }
// [Required]
// public decimal HoursBalance { get; set; }
// public decimal? LastHoursBalance { get; set; }
public ServiceBank()
{
EntryDate = DateTime.UtcNow;
}
// public ServiceBank()
// {
// EntryDate = DateTime.UtcNow;
// }
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.ServiceBank; }
// [NotMapped, JsonIgnore]
// public AyaType AyaType { get => AyaType.ServiceBank; }
}//eoc
// }//eoc
//Data transfer version used by UI to make new entry or consume banked time
//this way the client doesn't need to bother with balances or last entries and such
public class dtServiceBank
{
public long Id { get; set; }
public uint Concurrency { get; set; }
// //Data transfer version used by UI to make new entry or consume banked time
// //this way the client doesn't need to bother with balances or last entries and such
// public class dtServiceBank
// {
// public long Id { get; set; }
// public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
[Required]
public long ObjectId { get; set; }
[Required]
public AyaType AType { get; set; }
[Required]
public long SourceId { get; set; }
[Required]
public AyaType SourceType { get; set; }
[Required]
public decimal Incidents { get; set; }
[Required]
public decimal Currency { get; set; }
[Required]
public decimal Hours { get; set; }
// [Required]
// public string Name { get; set; }
// [Required]
// public long ObjectId { get; set; }
// [Required]
// public AyaType AType { get; set; }
// [Required]
// public long SourceId { get; set; }
// [Required]
// public AyaType SourceType { get; set; }
// [Required]
// public decimal Incidents { get; set; }
// [Required]
// public decimal Currency { get; set; }
// [Required]
// public decimal Hours { get; set; }
}//eoc
// }//eoc
}//eons
/*
CREATE TABLE [dbo].[ASERVICEBANK](
[AID] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,//displays as "Entered" in v7 ui
[ACREATOR] [uniqueidentifier] NOT NULL,
[ADESCRIPTION] [nvarchar](255) NULL,
[ASOURCEROOTOBJECTTYPE] [smallint] NOT NULL,
[AEFFECTIVEDATE] [datetime] NULL,//docs for v7 say for what have you purposes, not relevant, for v8 IMPORT AS transactiondat
[AINCIDENTS] [decimal](19, 5) NULL,
[AINCIDENTSBALANCE] [decimal](19, 5) NULL,
[ACURRENCY] [decimal](19, 5) NULL,
[ACURRENCYBALANCE] [decimal](19, 5) NULL,
[AHOURS] [decimal](19, 5) NULL,
[AHOURSBALANCE] [decimal](19, 5) NULL,
[AAPPLIESTOROOTOBJECTID] [uniqueidentifier] NOT NULL,
[AAPPLIESTOROOTOBJECTTYPE] [smallint] NOT NULL,
[ASOURCEROOTOBJECTID] [uniqueidentifier] NULL,
*/
// }//eons
// /*
// CREATE TABLE [dbo].[ASERVICEBANK](
// [AID] [uniqueidentifier] NOT NULL,
// [ACREATED] [datetime] NOT NULL,//displays as "Entered" in v7 ui
// [ACREATOR] [uniqueidentifier] NOT NULL,
// [ADESCRIPTION] [nvarchar](255) NULL,
// [ASOURCEROOTOBJECTTYPE] [smallint] NOT NULL,
// [AEFFECTIVEDATE] [datetime] NULL,//docs for v7 say for what have you purposes, not relevant, for v8 IMPORT AS transactiondat
// [AINCIDENTS] [decimal](19, 5) NULL,
// [AINCIDENTSBALANCE] [decimal](19, 5) NULL,
// [ACURRENCY] [decimal](19, 5) NULL,
// [ACURRENCYBALANCE] [decimal](19, 5) NULL,
// [AHOURS] [decimal](19, 5) NULL,
// [AHOURSBALANCE] [decimal](19, 5) NULL,
// [AAPPLIESTOROOTOBJECTID] [uniqueidentifier] NOT NULL,
// [AAPPLIESTOROOTOBJECTTYPE] [smallint] NOT NULL,
// [ASOURCEROOTOBJECTID] [uniqueidentifier] NULL,
// */