This commit is contained in:
81
server/AyaNova/models/ServiceBank.cs
Normal file
81
server/AyaNova/models/ServiceBank.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
|
||||
//otherwise the server will call it an invalid record if the field isn't sent from client
|
||||
|
||||
//NOTE: following pattern outlined here:
|
||||
//https://dba.stackexchange.com/a/19368
|
||||
|
||||
public class ServiceBank
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public DateTime EntryDate { get; set; }
|
||||
[Required]
|
||||
public DateTime LastEntryDate { get; set; }
|
||||
[Required]
|
||||
public long ObjectId { get; set; }
|
||||
[Required]
|
||||
public AyaType ObjectType { 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; }
|
||||
[Required]
|
||||
public decimal LastIncidentsBalance { get; set; }
|
||||
[Required]
|
||||
public decimal Currency { get; set; }
|
||||
[Required]
|
||||
public decimal CurencyBalance { get; set; }
|
||||
[Required]
|
||||
public decimal LastCurencyBalance { get; set; }
|
||||
|
||||
[Required]
|
||||
public decimal Hours { get; set; }
|
||||
[Required]
|
||||
public decimal HoursBalance { get; set; }
|
||||
[Required]
|
||||
public decimal LastHoursBalance { get; set; }
|
||||
|
||||
|
||||
public ServiceBank()
|
||||
{
|
||||
EntryDate = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
}//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,
|
||||
*/
|
||||
Reference in New Issue
Block a user