Files
raven/server/AyaNova/models/Contract.cs
2021-03-04 22:24:40 +00:00

75 lines
2.1 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AyaNova.Biz;
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 Contract : 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; }
//new for v8
//response
//discountservicerate (all service rates)
//discounttravelrate (all travel)
public Contract()
{
Tags = new List<string>();
}
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.Contract; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[ACONTRACT](
[AID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NULL,
[AMODIFIER] [uniqueidentifier] NULL,
[ACREATED] [datetime] NULL,
[AMODIFIED] [datetime] NULL,
[ADISCOUNTPARTS] [decimal](19, 5) NULL,
[ANAME] [nvarchar](255) NULL,
[AACTIVE] [bit] NOT NULL,
[ANOTES] [ntext] NULL,
[ACONTRACTRATESONLY] [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,
CHILDREN
ContractRate - specific contract rates available to contract holding entities only
ContractTravel - specific contract travel rates only ''
ContractRateTagOverride - tags and discount / markup to apply collection
ContractTravelTagOverride - ''
ContractPartTagOverride - ''
*/