196 lines
8.4 KiB
C#
196 lines
8.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Newtonsoft.Json;
|
|
namespace AyaNova.Models
|
|
{
|
|
|
|
public class GlobalBizSettings
|
|
{
|
|
|
|
//This is the replacement for most of the Global object settings in v7 which has been subdivided further in v8 into backup / ops / notification and this general biz
|
|
//this object is only interested in Business object related settings and configuration specifically
|
|
|
|
|
|
public long Id { get; set; }//this is always 1 as there is only ever one single global biz object
|
|
public uint Concurrency { get; set; }
|
|
|
|
//Global settings
|
|
//############# NOTE: OTHER AREAS THAT MUST MATCH CHANGES HERE ARE:
|
|
//GlobalBizSettingsController::GetClientGlobalBizSettings
|
|
//ServerGlobalBizSettings
|
|
|
|
//Picklist and other searches override the normal case insensitive value
|
|
//this is precautionarily added for non latinate languages where it could be an issue
|
|
public bool FilterCaseSensitive { get; set; }
|
|
public bool UseInventory { get; set; }
|
|
|
|
//TAX CODE DEFAULTS
|
|
public long? TaxPartPurchaseId { get; set; }
|
|
public long? TaxPartSaleId { get; set; }
|
|
public long? TaxRateSaleId { get; set; }
|
|
|
|
|
|
//DEFAULT WO MINUTES
|
|
[Required]
|
|
public int WorkLaborScheduleDefaultMinutes { get; set; }
|
|
[Required]
|
|
public int WorkOrderTravelDefaultMinutes { get; set; }
|
|
|
|
[Required]
|
|
public TimeSpan WorkOrderCompleteByAge { get; set; } = TimeSpan.Zero;//was workorderclosebyage
|
|
|
|
public bool AllowScheduleConflicts { get; set; } = true;
|
|
|
|
//ADDRESS / CONTACT INFO reporting etc
|
|
public string WebAddress { get; set; }
|
|
public string EmailAddress { get; set; }
|
|
public string Phone1 { get; set; }
|
|
public string Phone2 { get; set; }
|
|
//POSTAL ADDRESS
|
|
public string PostAddress { get; set; }
|
|
public string PostCity { get; set; }
|
|
public string PostRegion { get; set; }
|
|
public string PostCountry { get; set; }
|
|
public string PostCode { get; set; }
|
|
|
|
//PHYSICAL ADDRESS
|
|
public string Address { get; set; }
|
|
public string City { get; set; }
|
|
public string Region { get; set; }
|
|
public string Country { get; set; }
|
|
public decimal? Latitude { get; set; }
|
|
public decimal? Longitude { get; set; }
|
|
|
|
|
|
//CUSTOMER ACCESS FEATURES AND SETTINGS
|
|
public long? CustomerDefaultWorkOrderReportId { get; set; }
|
|
|
|
public long? CustomerTagWorkOrderReport1Id { get; set; }
|
|
public List<string> CustomerWorkOrderReport1Tags { get; set; } = new List<string>();
|
|
|
|
public long? CustomerTagWorkOrderReport2Id { get; set; }
|
|
public List<string> CustomerWorkOrderReport2Tags { get; set; } = new List<string>();
|
|
|
|
public long? CustomerTagWorkOrderReport3Id { get; set; }
|
|
public List<string> CustomerWorkOrderReport3Tags { get; set; } = new List<string>();
|
|
|
|
public long? CustomerTagWorkOrderReport4Id { get; set; }
|
|
public List<string> CustomerWorkOrderReport4Tags { get; set; } = new List<string>();
|
|
|
|
public long? CustomerTagWorkOrderReport5Id { get; set; }
|
|
public List<string> CustomerWorkOrderReport5Tags { get; set; } = new List<string>();
|
|
|
|
public string CustomerServiceRequestInfoText { get; set; }
|
|
|
|
public bool CustomerAllowCSR { get; set; }
|
|
public List<string> CustomerAllowCSRInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowCreateUnit { get; set; }
|
|
public List<string> CustomerAllowCreateUnitInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowViewWO { get; set; }
|
|
public List<string> CustomerAllowViewWOInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowWOWiki { get; set; }
|
|
public List<string> CustomerAllowWOWikiInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowWOAttachments { get; set; }
|
|
public List<string> CustomerAllowWOAttachmentsInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowUserSettings { get; set; }
|
|
public List<string> CustomerAllowUserSettingsInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowNotifyServiceImminent { get; set; }
|
|
public List<string> CustomerAllowNotifyServiceImminentInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowNotifyCSRAccepted { get; set; }
|
|
public List<string> CustomerAllowNotifyCSRAcceptedInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowNotifyCSRRejected { get; set; }
|
|
public List<string> CustomerAllowNotifyCSRRejectedInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowNotifyWOCreated { get; set; }
|
|
public List<string> CustomerAllowNotifyWOCreatedInTags { get; set; } = new List<string>();
|
|
|
|
public bool CustomerAllowNotifyWOCompleted { get; set; }
|
|
public List<string> CustomerAllowNotifyWOCompletedInTags { get; set; } = new List<string>();
|
|
|
|
public string SignatureTitle { get; set; }
|
|
public string SignatureHeader { get; set; }
|
|
public string SignatureFooter { get; set; }
|
|
|
|
|
|
public List<string> AllTags(){
|
|
var t=new List<string>();
|
|
t.AddRange(this.CustomerWorkOrderReport1Tags);
|
|
t.AddRange(this.CustomerWorkOrderReport2Tags);
|
|
t.AddRange(this.CustomerWorkOrderReport3Tags);
|
|
t.AddRange(this.CustomerWorkOrderReport4Tags);
|
|
t.AddRange(this.CustomerWorkOrderReport5Tags);
|
|
t.AddRange(this.CustomerAllowCSRInTags);
|
|
t.AddRange(this.CustomerAllowCreateUnitInTags);
|
|
t.AddRange(this.CustomerAllowViewWOInTags);
|
|
t.AddRange(this.CustomerAllowWOWikiInTags);
|
|
t.AddRange(this.CustomerAllowWOAttachmentsInTags);
|
|
t.AddRange(this.CustomerAllowUserSettingsInTags);
|
|
t.AddRange(this.CustomerAllowNotifyServiceImminentInTags);
|
|
t.AddRange(this.CustomerAllowNotifyCSRAcceptedInTags);
|
|
t.AddRange(this.CustomerAllowNotifyCSRRejectedInTags);
|
|
t.AddRange(this.CustomerAllowNotifyWOCreatedInTags);
|
|
t.AddRange(this.CustomerAllowNotifyWOCompletedInTags);
|
|
return t;
|
|
}
|
|
|
|
public GlobalBizSettings()
|
|
{
|
|
Id = 1;//always 1
|
|
FilterCaseSensitive = false;
|
|
UseInventory = true;
|
|
}
|
|
}
|
|
|
|
//Used internally and at client end as extended rights atop roles system in relation only to Contact (customer type users)
|
|
public record CustomerRightsRecord(bool CSR, bool CreateUnit, bool WO, bool WOWIKI, bool WOAttachments, bool UserSettings, bool NotifyServiceImminent, bool NotifyCSRAccepted, bool NotifyCSRRejected, bool NotifyWOCreated, bool NotifyWOCompleted, long EntityId, bool EntityActive, long?ThisWOEffectiveWOReportId, bool ThisWOCanWiki, bool ThisWOCanAttachments);
|
|
}
|
|
/*
|
|
CREATE TABLE [dbo].[AGLOBAL](
|
|
[ACREATED] [datetime] NULL,
|
|
[AMODIFIED] [datetime] NULL,
|
|
[ACREATOR] [uniqueidentifier] NULL,
|
|
[AMODIFIER] [uniqueidentifier] NULL,
|
|
[ATAXPARTPURCHASEID] [uniqueidentifier] NULL,
|
|
[ATAXPARTSALEID] [uniqueidentifier] NULL,
|
|
[ATAXRATESALEID] [uniqueidentifier] NULL,
|
|
[AALLOWSCHEDULECONFLICTS] [bit] NOT NULL,
|
|
[ALANGUAGE] [nvarchar](255) NULL,
|
|
[AUSEREGIONS] [bit] NOT NULL,
|
|
[AWORKORDERCLOSEDSTATUS] [uniqueidentifier] NULL,
|
|
[AWORKORDERSUMMARYTEMPLATE] [nvarchar](500) NOT NULL,
|
|
[AUSEINVENTORY] [bit] NOT NULL,
|
|
[AUNITNAMEFORMAT] [smallint] NULL,
|
|
[ASCHEDULEABLEUSERNAMEFORMAT] [smallint] NULL,
|
|
[ACJKINDEX] [bit] NOT NULL,
|
|
[APARTFORMAT] [smallint] NULL,
|
|
[AWORKORDERCLOSEBYAGE] [int] NOT NULL,
|
|
[AUSENOTIFICATION] [bit] NOT NULL,
|
|
[ANOTIFYSMTPHOST] [nvarchar](255) NULL,
|
|
[ANOTIFYSMTPACCOUNT] [nvarchar](255) NULL,
|
|
[ANOTIFYSMTPPASSWORD] [nvarchar](255) NULL,
|
|
[ANOTIFYSMTPFROM] [nvarchar](255) NULL,
|
|
[ACOORDINATESTYLE] [smallint] NULL,
|
|
[ADEFAULTLATITUDE] [smallint] NULL,
|
|
[ADEFAULTLONGITUDE] [smallint] NULL,
|
|
[ADEFAULTSERVICETEMPLATEID] [uniqueidentifier] NULL,
|
|
[AMAXFILESIZEMB] [int] NULL,
|
|
[ALABORSCHEDUSERDFLTTIMESPAN] [int] NOT NULL,
|
|
[ATRAVELDFLTTIMESPAN] [int] NOT NULL,
|
|
[ANOTIFYENCRYPTION] [nvarchar](255) NULL,
|
|
[ASMTPRETRY] [bit] NOT NULL,
|
|
[AFORMCUSTOM] [ntext] NULL,
|
|
[ASIGNATURETITLE] [ntext] NULL,
|
|
[ASIGNATUREHEADER] [ntext] NULL,
|
|
[ASIGNATUREFOOTER] [ntext] NULL,
|
|
[ASCHEDUSERNONTODAYSTARTTIME] [datetime] NULL,
|
|
[AMAINGRIDAUTOREFRESH] [bit] NOT NULL
|
|
*/ |