This commit is contained in:
2020-11-23 18:17:39 +00:00
parent 5d2d3e93aa
commit dc7671cdc1
3 changed files with 18 additions and 9 deletions

View File

@@ -1,33 +1,38 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
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 CustomerNote : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
[Required]
public long UserId { get; set; }
[Required]
public DateTime NoteDate { get; set; }
public string Notes { get; set; }
public List<string> Tags { get; set; }
public CustomerNote()
{
NoteDate = DateTime.UtcNow;
Tags = new List<string>();
}
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.CustomerNote; }
[JsonIgnore]//hide from being returned (as null anyway) with User object in routes
public User User { get; set; }
}//eoc
}//eons