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 UnitMeterReading { public long Id { get; set; } public uint Concurrency { get; set; } public string Notes { get; set; } public long Meter { get; set; } public DateTime MeterDate { get; set; } public long UnitId { get; set; } public long? WorkOrderItemUnitId { get; set; } [NotMapped] public string UnitViz { get; set; } [NotMapped] public string WorkOrderViz { get; set; } public UnitMeterReading() { } }//eoc }//eons /* CREATE TABLE [dbo].[AUNITMETERREADING]( [AID] [uniqueidentifier] NOT NULL, [ADESCRIPTION] [nvarchar](255) NULL, [ACREATED] [datetime] NOT NULL, [AMODIFIED] [datetime] NOT NULL, [ACREATOR] [uniqueidentifier] NOT NULL, [AMODIFIER] [uniqueidentifier] NOT NULL, [AMETER] [bigint] NULL, [AMETERDATE] [datetime] NULL, [AUNITID] [uniqueidentifier] NULL, [AWORKORDERITEMID] [uniqueidentifier] NULL, */