This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
45
server/AyaNova/models/UnitMeterReading.cs
Normal file
45
server/AyaNova/models/UnitMeterReading.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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
|
||||
|
||||
public class UnitMeterReading
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
public string Description { get; set; }
|
||||
public long Meter { get; set; }
|
||||
public DateTime MeterDate { get; set; }
|
||||
public long UnitId { get; set; }
|
||||
public long? WorkOrderItemId { get; set; }
|
||||
|
||||
public UnitMeterReading()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
/*
|
||||
CREATE TABLE [dbo].[AUNITMETERREADING](
|
||||
[AID] [uniqueidentifier] NOT NULL,
|
||||
[ADESCRIPTION] [nvarchar](255) NULL,
|
||||
[ACREATED] [datetime] NOT NULL,
|
||||
[AMODIFIED] [datetime] NOT NULL,
|
||||
[ACREATOR] [uniqueidentifier] NOT NULL,
|
||||
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
||||
[AMETER] [bigint] NULL,
|
||||
[AMETERDATE] [datetime] NULL,
|
||||
[AUNITID] [uniqueidentifier] NULL,
|
||||
[AWORKORDERITEMID] [uniqueidentifier] NULL,
|
||||
*/
|
||||
@@ -22,16 +22,16 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 1;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1220;
|
||||
internal const long EXPECTED_INDEX_COUNT = 145;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 513;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 189;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1226;
|
||||
internal const long EXPECTED_INDEX_COUNT = 146;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 517;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 191;
|
||||
internal const long EXPECTED_VIEWS = 7;
|
||||
internal const long EXPECTED_ROUTINES = 2;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////////////////////////////// C1220:I145:CC513:FC189:V7:R2
|
||||
///////////////////////////////////////////////////////////////// (C1226:I146:CC517:FC191:V7:R2)
|
||||
|
||||
/*
|
||||
|
||||
@@ -1082,7 +1082,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
+ "SentDate TIMESTAMP, etadate TIMESTAMP, returndate TIMESTAMP"
|
||||
+ ")");
|
||||
|
||||
|
||||
//###########################################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//CUSTOMERSERVICEREQUEST
|
||||
await ExecQueryAsync("CREATE TABLE acustomerservicerequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL, "
|
||||
@@ -1117,6 +1118,10 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("CREATE TABLE anotifydeliverylog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, processed TIMESTAMP NOT NULL, "
|
||||
+ "objectid BIGINT NOT NULL, notifysubscriptionid BIGINT NOT NULL, fail BOOL NOT NULL, error TEXT)");
|
||||
|
||||
//UNITMETERREADING
|
||||
await ExecQueryAsync("CREATE TABLE aunitmeterreading (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, meterdate TIMESTAMP NOT NULL, description TEXT, "
|
||||
+ "meter BIGINT NOT NULL, unitid BIGINT NOT NULL REFERENCES aunit(id) ON DELETE CASCADE, workorderitemid BIGINT REFERENCES aworkorderitem(id) ON DELETE SET NULL)");
|
||||
|
||||
//LOGO
|
||||
await ExecQueryAsync("CREATE TABLE alogo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
|
||||
+ "large bytea, largetype TEXT, medium bytea, mediumtype TEXT, small bytea, smalltype TEXT)");
|
||||
|
||||
Reference in New Issue
Block a user