This commit is contained in:
@@ -121,7 +121,11 @@ namespace AyaNova.Biz
|
|||||||
[CoreBizObject]
|
[CoreBizObject]
|
||||||
Memo = 60,
|
Memo = 60,
|
||||||
[CoreBizObject]
|
[CoreBizObject]
|
||||||
Review = 61
|
Review = 61,
|
||||||
|
[CoreBizObject]
|
||||||
|
ServiceRate = 62,
|
||||||
|
[CoreBizObject]
|
||||||
|
TravelRate = 63
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ namespace AyaNova.Models
|
|||||||
public virtual DbSet<Unit> Unit { get; set; }
|
public virtual DbSet<Unit> Unit { get; set; }
|
||||||
public virtual DbSet<UnitModel> UnitModel { get; set; }
|
public virtual DbSet<UnitModel> UnitModel { get; set; }
|
||||||
public virtual DbSet<Vendor> Vendor { get; set; }
|
public virtual DbSet<Vendor> Vendor { get; set; }
|
||||||
|
public virtual DbSet<ServiceRate> ServiceRate { get; set; }
|
||||||
|
public virtual DbSet<TravelRate> TravelRate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//WorkOrder
|
//WorkOrder
|
||||||
public virtual DbSet<WorkOrder> WorkOrder { get; set; }
|
public virtual DbSet<WorkOrder> WorkOrder { get; set; }
|
||||||
public virtual DbSet<WorkOrderItem> WorkOrderItem { get; set; }
|
public virtual DbSet<WorkOrderItem> WorkOrderItem { get; set; }
|
||||||
|
|||||||
64
server/AyaNova/models/LaborRate.cs
Normal file
64
server/AyaNova/models/LaborRate.cs
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
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 ServiceRate : ICoreBizObjectModel
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
public bool Active { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
public string Wiki { get; set; }
|
||||||
|
public string CustomFields { get; set; }
|
||||||
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
[Required]
|
||||||
|
public decimal Cost { get; set; }
|
||||||
|
[Required]
|
||||||
|
public decimal Charge { get; set; }
|
||||||
|
public string Unit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ServiceRate()
|
||||||
|
{
|
||||||
|
Tags = new List<string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[NotMapped, JsonIgnore]
|
||||||
|
public AyaType AyaType { get => AyaType.ServiceRate; }
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
|
||||||
|
}//eons
|
||||||
|
/*
|
||||||
|
CREATE TABLE [dbo].[ARATE](
|
||||||
|
[AID] [uniqueidentifier] NOT NULL,
|
||||||
|
[ACREATED] [datetime] NOT NULL,
|
||||||
|
[AMODIFIED] [datetime] NOT NULL,
|
||||||
|
[AACTIVE] [bit] NOT NULL,
|
||||||
|
[ACREATOR] [uniqueidentifier] NOT NULL,
|
||||||
|
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
||||||
|
[ANAME] [nvarchar](255) NOT NULL,
|
||||||
|
[ADESCRIPTION] [nvarchar](255) NULL,//NOW NOTES
|
||||||
|
[AACCOUNTNUMBER] [nvarchar](255) NULL,
|
||||||
|
[ACOST] [decimal](19, 5) NULL,
|
||||||
|
[ACHARGE] [decimal](19, 5) NULL,
|
||||||
|
[ARATETYPE] [smallint] NOT NULL,//REMOVE SPLITTING INTO TRAVEL AND LABOR SEPERATELY
|
||||||
|
[ARATEUNITCHARGEDESCRIPTIONID] [uniqueidentifier] //TURN THIS INTO TEXT PLAIN AND SIMPLE,
|
||||||
|
[ACLIENTGROUPID] [uniqueidentifier] NULL, //TAG remove
|
||||||
|
[ACONTRACTRATE] [bit] NOT NULL,//THIS IS ONLY FOR THE UI, REMOVE IT
|
||||||
|
[AREGIONID] [uniqueidentifier] NULL,//tag, remove
|
||||||
|
*/
|
||||||
64
server/AyaNova/models/TravelRate.cs
Normal file
64
server/AyaNova/models/TravelRate.cs
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
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 TravelRate : ICoreBizObjectModel
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
public bool Active { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
public string Wiki { get; set; }
|
||||||
|
public string CustomFields { get; set; }
|
||||||
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
[Required]
|
||||||
|
public decimal Cost { get; set; }
|
||||||
|
[Required]
|
||||||
|
public decimal Charge { get; set; }
|
||||||
|
public string Unit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public TravelRate()
|
||||||
|
{
|
||||||
|
Tags = new List<string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[NotMapped, JsonIgnore]
|
||||||
|
public AyaType AyaType { get => AyaType.TravelRate; }
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
|
||||||
|
}//eons
|
||||||
|
/*
|
||||||
|
CREATE TABLE [dbo].[ARATE](
|
||||||
|
[AID] [uniqueidentifier] NOT NULL,
|
||||||
|
[ACREATED] [datetime] NOT NULL,
|
||||||
|
[AMODIFIED] [datetime] NOT NULL,
|
||||||
|
[AACTIVE] [bit] NOT NULL,
|
||||||
|
[ACREATOR] [uniqueidentifier] NOT NULL,
|
||||||
|
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
||||||
|
[ANAME] [nvarchar](255) NOT NULL,
|
||||||
|
[ADESCRIPTION] [nvarchar](255) NULL,//NOW NOTES
|
||||||
|
[AACCOUNTNUMBER] [nvarchar](255) NULL,
|
||||||
|
[ACOST] [decimal](19, 5) NULL,
|
||||||
|
[ACHARGE] [decimal](19, 5) NULL,
|
||||||
|
[ARATETYPE] [smallint] NOT NULL,//REMOVE SPLITTING INTO TRAVEL AND Travel SEPERATELY
|
||||||
|
[ARATEUNITCHARGEDESCRIPTIONID] [uniqueidentifier] //TURN THIS INTO TEXT PLAIN AND SIMPLE,
|
||||||
|
[ACLIENTGROUPID] [uniqueidentifier] NULL, //TAG remove
|
||||||
|
[ACONTRACTRATE] [bit] NOT NULL,//THIS IS ONLY FOR THE UI, REMOVE IT
|
||||||
|
[AREGIONID] [uniqueidentifier] NULL,//tag, remove
|
||||||
|
*/
|
||||||
@@ -2025,5 +2025,9 @@
|
|||||||
"Failed": "Fehlgeschlagen",
|
"Failed": "Fehlgeschlagen",
|
||||||
"ProcessingJob": "Serverjob verarbeiten",
|
"ProcessingJob": "Serverjob verarbeiten",
|
||||||
"TimedOut": "Zeitüberschreitung",
|
"TimedOut": "Zeitüberschreitung",
|
||||||
"Now": "Jetzt"
|
"Now": "Jetzt",
|
||||||
|
"ServiceRate": "Service-Rate",
|
||||||
|
"TravelRate": "Reiserate",
|
||||||
|
"ServiceRateList": "Serviceraten",
|
||||||
|
"TravelRateList": "Reiseratenliste"
|
||||||
}
|
}
|
||||||
@@ -2025,5 +2025,9 @@
|
|||||||
"Failed": "Failed",
|
"Failed": "Failed",
|
||||||
"ProcessingJob": "Processing server job",
|
"ProcessingJob": "Processing server job",
|
||||||
"TimedOut": "Timed out",
|
"TimedOut": "Timed out",
|
||||||
"Now": "Now"
|
"Now": "Now",
|
||||||
|
"ServiceRate": "Service rate",
|
||||||
|
"TravelRate": "Travel rate",
|
||||||
|
"ServiceRateList": "Service rates",
|
||||||
|
"TravelRateList": "Travel rates"
|
||||||
}
|
}
|
||||||
@@ -2025,5 +2025,9 @@
|
|||||||
"Failed": "Fallido",
|
"Failed": "Fallido",
|
||||||
"ProcessingJob": "Procesando trabajo del servidor",
|
"ProcessingJob": "Procesando trabajo del servidor",
|
||||||
"TimedOut": "Tiempo de espera agotado",
|
"TimedOut": "Tiempo de espera agotado",
|
||||||
"Now": "Ahora"
|
"Now": "Ahora",
|
||||||
|
"ServiceRate": "Tasa de trabajo",
|
||||||
|
"TravelRate": "Tasa de viaje",
|
||||||
|
"ServiceRateList": "Tasas laborales",
|
||||||
|
"TravelRateList": "Tarifas de viaje"
|
||||||
}
|
}
|
||||||
@@ -2025,5 +2025,9 @@
|
|||||||
"Failed": "Échec",
|
"Failed": "Échec",
|
||||||
"ProcessingJob": "Traitement du travail du serveur",
|
"ProcessingJob": "Traitement du travail du serveur",
|
||||||
"TimedOut": "Délai dépassé",
|
"TimedOut": "Délai dépassé",
|
||||||
"Now": "Maintenant"
|
"Now": "Maintenant",
|
||||||
|
"ServiceRate": "Taux de service",
|
||||||
|
"TravelRate": "Tarif voyage",
|
||||||
|
"ServiceRateList": "Tarifs de service",
|
||||||
|
"TravelRateList": "Tarifs de voyage"
|
||||||
}
|
}
|
||||||
@@ -565,6 +565,20 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
{
|
{
|
||||||
LogUpdateMessage(log);
|
LogUpdateMessage(log);
|
||||||
|
|
||||||
|
//SERVICERATE
|
||||||
|
await ExecQueryAsync("CREATE TABLE aservicerate (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, " +
|
||||||
|
"accountnumber text, unit text, cost decimal(19,4) not null default 0, charge decimal(19,4) not null default 0)");
|
||||||
|
await ExecQueryAsync("CREATE UNIQUE INDEX aservicerate_name_id_idx ON aservicerate (id, name);");
|
||||||
|
await ExecQueryAsync("CREATE INDEX aservicerate_tags ON aservicerate using GIN(tags)");
|
||||||
|
|
||||||
|
//TRAVELRATE
|
||||||
|
await ExecQueryAsync("CREATE TABLE atravelrate (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, " +
|
||||||
|
"accountnumber text, unit text, cost decimal(19,4) not null default 0, charge decimal(19,4) not null default 0)");
|
||||||
|
await ExecQueryAsync("CREATE UNIQUE INDEX atravelrate_name_id_idx ON atravelrate (id, name);");
|
||||||
|
await ExecQueryAsync("CREATE INDEX atravelrate_tags ON atravelrate using GIN(tags)");
|
||||||
|
|
||||||
//MEMO
|
//MEMO
|
||||||
await ExecQueryAsync("CREATE TABLE amemo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, " +
|
await ExecQueryAsync("CREATE TABLE amemo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, " +
|
||||||
"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