41 lines
860 B
C#
41 lines
860 B
C#
using DAL.Models.Audits;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace DAL.Models
|
|
{
|
|
[Table("colors")]
|
|
[Index("updater", Name = "colors_users_id_fk")]
|
|
public class Color
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public ulong id { get; set; }
|
|
|
|
[Column("red")]
|
|
public byte red { get; set; }
|
|
|
|
[Column("blue")]
|
|
public byte blue { get; set; }
|
|
|
|
[Column("green")]
|
|
public byte green { get; set; }
|
|
|
|
[Column("name")]
|
|
[MaxLength(64)]
|
|
public string name { get; set; } = null!;
|
|
|
|
[Column("updated")]
|
|
[DataType("datetime")]
|
|
public DateTime updated { get; set; }
|
|
|
|
[Column("updater")]
|
|
public ulong updater { get; set; }
|
|
|
|
public User updaterRelation { get; set; } = null!;
|
|
|
|
public ICollection<AuditColor> audits { get; set; } = new List<AuditColor>();
|
|
}
|
|
}
|