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_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"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_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -1,33 +1,38 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using AyaNova.Biz;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using AyaNova.Biz;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace AyaNova.Models
|
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 CustomerNote : ICoreBizObjectModel
|
public class CustomerNote : ICoreBizObjectModel
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public uint Concurrency { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
[Required]
|
||||||
|
public long UserId { get; set; }
|
||||||
|
[Required]
|
||||||
public DateTime NoteDate { get; set; }
|
public DateTime NoteDate { get; set; }
|
||||||
|
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public CustomerNote()
|
public CustomerNote()
|
||||||
{
|
{
|
||||||
|
NoteDate = DateTime.UtcNow;
|
||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[NotMapped, JsonIgnore]
|
[NotMapped, JsonIgnore]
|
||||||
public AyaType AyaType { get => AyaType.CustomerNote; }
|
public AyaType AyaType { get => AyaType.CustomerNote; }
|
||||||
|
|
||||||
|
[JsonIgnore]//hide from being returned (as null anyway) with User object in routes
|
||||||
|
public User User { get; set; }
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
|
|
||||||
}//eons
|
}//eons
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ 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 = 15;
|
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 450;
|
internal const long EXPECTED_COLUMN_COUNT = 455;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 144;
|
internal const long EXPECTED_INDEX_COUNT = 145;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
|
|
||||||
@@ -492,6 +492,10 @@ $BODY$;
|
|||||||
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (customerid) REFERENCES acustomer(id)");
|
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (customerid) REFERENCES acustomer(id)");
|
||||||
|
|
||||||
|
|
||||||
|
//CUSTOMER NOTES
|
||||||
|
await ExecQueryAsync("CREATE TABLE acustomernotes (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
|
||||||
|
"userid bigint not null REFERENCES auser(id), startdate timestamp not null, notes text, tags varchar(255) ARRAY )");
|
||||||
|
|
||||||
//CONTRACT
|
//CONTRACT
|
||||||
await ExecQueryAsync("CREATE TABLE acontract (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " +
|
await ExecQueryAsync("CREATE TABLE acontract (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " +
|
||||||
"notes text, wiki text, customfields text, tags varchar(255) ARRAY )");
|
"notes text, wiki text, customfields text, tags varchar(255) ARRAY )");
|
||||||
|
|||||||
Reference in New Issue
Block a user