This commit is contained in:
2020-01-16 23:40:36 +00:00
parent d3cb9bea90
commit 54f90be425
4 changed files with 29 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace AyaNova.Models
{
@@ -14,7 +14,7 @@ namespace AyaNova.Models
public long Id { get; set; }
public uint ConcurrencyToken { get; set; }
[Required]
[Required]
public string Name { get; set; }
public uint Serial { get; set; }
public decimal? DollarAmount { get; set; }
@@ -26,10 +26,16 @@ namespace AyaNova.Models
public int? Count { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
//relations
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
[JsonIgnore]//hide from being returned (as null anyway) with User object in routes
public User User { get; set; }
[Required]
public long UserId { get; set; }
public Widget()
{
Tags = new List<string>();
Tags = new List<string>();
}
}