75 lines
2.5 KiB
C#
75 lines
2.5 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
|
||
|
||
public class Reminder : 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; }
|
||
|
||
[Required]
|
||
public DateTime StartDate { get; set; }
|
||
[Required]
|
||
public DateTime StopDate { get; set; }
|
||
[Required]
|
||
public long UserId { get; set; }
|
||
[NotMapped]
|
||
public string UserViz { get; set; }
|
||
/*
|
||
Hexadecimal notation: #RGB[A]
|
||
R (red), G (green), B (blue), and A (alpha) are hexadecimal characters (0–9, A–F). A is optional. The three-digit notation (#RGB) is a shorter version of the six-digit form (#RRGGBB). For example, #f09 is the same color as #ff0099. Likewise, the four-digit RGB notation (#RGBA) is a shorter version of the eight-digit form (#RRGGBBAA). For example, #0f38 is the same color as #00ff3388.
|
||
*/
|
||
[MaxLength(12)]
|
||
public string Color { get; set; }
|
||
|
||
public Reminder()
|
||
{
|
||
Tags = new List<string>();
|
||
Color = "#ffffff";//white / no color is the default
|
||
}
|
||
|
||
[NotMapped, JsonIgnore]
|
||
public AyaType AyaType { get => AyaType.Reminder; }
|
||
|
||
}//eoc
|
||
|
||
}//eons
|
||
|
||
/*
|
||
DATES should be indexed for fast viewing
|
||
CREATE TABLE [dbo].[ASCHEDULEMARKER](
|
||
[AID] [uniqueidentifier] NOT NULL,
|
||
[ACREATED] [datetime] NOT NULL,
|
||
[ACREATOR] [uniqueidentifier] NOT NULL,
|
||
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
||
[ANAME] [nvarchar](255) NULL,
|
||
[ANOTES] [ntext] NULL,
|
||
[AMODIFIED] [datetime] NULL,
|
||
[ASTARTDATE] [datetime] NULL,
|
||
[ASTOPDATE] [datetime] NULL,
|
||
[ASCHEDULEMARKERSOURCETYPE] [smallint] NULL,
|
||
[ASOURCEID] [uniqueidentifier] NOT NULL,
|
||
[AARGB] [int] NULL,
|
||
|
||
NOPE: these are for Review, not reminder
|
||
[AFOLLOWID] [uniqueidentifier] NULL,
|
||
[AFOLLOWTYPE] [smallint] NULL,
|
||
[ACOMPLETED] [bit] NOT NULL,
|
||
|
||
*/ |