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 Project : 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 Tags { get; set; } public DateTime? DateStarted { get; set; } public DateTime? DateCompleted { get; set; } public long? ProjectOverseerId { get; set; } [NotMapped] public string ProjectOverseerViz { get; set; } public string AccountNumber { get; set; } public Project() { Tags = new List(); DateStarted = DateTime.UtcNow; } [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.Project; } }//eoc }//eons /* [AID] [uniqueidentifier] NOT NULL, [ACREATED] [datetime] NOT NULL, [AMODIFIED] [datetime] NOT NULL, [ACREATOR] [uniqueidentifier] NOT NULL, [AMODIFIER] [uniqueidentifier] NOT NULL, [ANAME] [nvarchar](255) NULL, [ADATECOMPLETED] [datetime] NULL, [ANOTES] [ntext] NULL, [APROJECTOVERSEERID] [uniqueidentifier] NULL, [AACCOUNTNUMBER] [nvarchar](255) NULL, [ADATESTARTED] [datetime] NULL, [AACTIVE] [bit] NOT 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, [AREGIONID] [uniqueidentifier] NULL, */