126 lines
4.2 KiB
C#
126 lines
4.2 KiB
C#
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
|
|
|
|
//#### MIRRORED IN QBI !!
|
|
public class Customer : 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; }
|
|
|
|
|
|
//cant use these due to import v7 malformed shit adn can't be arsed to deal with that
|
|
//[Url]
|
|
public string WebAddress { get; set; }
|
|
public string AlertNotes { get; set; }
|
|
public bool BillHeadOffice { get; set; }
|
|
public long? HeadOfficeId { get; set; }
|
|
[NotMapped]
|
|
public string HeadOfficeViz { get; set; }
|
|
public string TechNotes { get; set; }
|
|
public string AccountNumber { get; set; }
|
|
//public bool UsesBanking { get; set; }
|
|
public long? ContractId { get; set; }
|
|
[NotMapped]
|
|
public string ContractViz { get; set; }
|
|
public DateTime? ContractExpires { get; set; }
|
|
[NotMapped]
|
|
public long? LastWorkOrderViz { get; set; }
|
|
[NotMapped]
|
|
public DateTime? LastServiceDateViz { get; set; }
|
|
public string Phone1 { get; set; }
|
|
public string Phone2 { get; set; }
|
|
public string Phone3 { get; set; }
|
|
public string Phone4 { get; set; }
|
|
public string Phone5 { get; set; }
|
|
public string EmailAddress { 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; }
|
|
|
|
|
|
public Customer()
|
|
{
|
|
Tags = new List<string>();
|
|
BillHeadOffice = false;
|
|
//UsesBanking = false;
|
|
}
|
|
|
|
[NotMapped, JsonIgnore]
|
|
public AyaType AyaType { get => AyaType.Customer; }
|
|
|
|
}//eoc
|
|
|
|
}//eons
|
|
/*
|
|
[AID] [uniqueidentifier] NOT NULL,
|
|
[ANAME] [nvarchar](255) NOT NULL,
|
|
[ACREATED] [datetime] NULL,
|
|
[AMODIFIED] [datetime] NULL,
|
|
[AACTIVE] [bit] NOT NULL,
|
|
[ACREATOR] [uniqueidentifier] NULL,
|
|
[AMODIFIER] [uniqueidentifier] NULL,
|
|
[ADISPATCHZONEID] [uniqueidentifier] NULL,
|
|
[AWEBADDRESS] [nvarchar](255) NULL,
|
|
[APOPUPNOTES] [ntext] NULL,
|
|
[ACLIENTGROUPID] [uniqueidentifier] NULL,
|
|
[ABILLHEADOFFICE] [bit] NOT NULL,
|
|
[AHEADOFFICEID] [uniqueidentifier] NULL,
|
|
[ANOTES] [ntext] NULL,
|
|
[AREGIONID] [uniqueidentifier] NULL,
|
|
[ATECHNOTES] [ntext] NULL,
|
|
[AACCOUNTNUMBER] [nvarchar](255) NULL,
|
|
[ACUSTOM1] [ntext] NULL,
|
|
[ACUSTOM2] [ntext] NULL,
|
|
[ACUSTOM3] [ntext] NULL,
|
|
[ACUSTOM4] [ntext] NULL,
|
|
[ACUSTOM5] [ntext] NULL,
|
|
[ACUSTOM6] [ntext] NULL,
|
|
[ACUSTOM7] [ntext] NULL,
|
|
[ACUSTOM8] [ntext] NULL,
|
|
[ACUSTOM9] [ntext] NULL,
|
|
[ACUSTOM0] [ntext] NULL,
|
|
[AUSESBANKING] [bit] NOT NULL,
|
|
[ACONTRACTID] [uniqueidentifier] NULL,
|
|
[ACONTRACTEXPIRES] [datetime] NULL,
|
|
[ALASTWORKORDERID] [uniqueidentifier] NULL,//dropped case 3536
|
|
[ALASTSERVICEDATE] [datetime] NULL,//dropped case 3536
|
|
[ADEFAULTSERVICETEMPLATEID] [uniqueidentifier] NULL,
|
|
[ACONTACTNOTES] [ntext] NULL,
|
|
[ACONTACT] [nvarchar](500) NULL,
|
|
[APHONE1] [nvarchar](255) NULL,
|
|
[APHONE2] [nvarchar](255) NULL,
|
|
[APHONE3] [nvarchar](255) NULL,
|
|
[APHONE4] [nvarchar](255) NULL,
|
|
[APHONE5] [nvarchar](255) NULL,
|
|
[AEMAIL] [nvarchar](255) NULL,
|
|
[ASENDNOTIFICATIONS] [bit] NOT NULL,
|
|
*/ |