DD.WellWorkover.Cloud/AsbCloudDb/Model/FileMark.cs

43 lines
1.4 KiB
C#
Raw Permalink Normal View History

using Microsoft.EntityFrameworkCore;
2022-04-11 18:00:34 +05:00
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2022-04-11 18:00:34 +05:00
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model
{
[Table("t_file_mark"), Comment("Действия с файлами.")]
public class FileMark
{
[Key]
[Column("id")]
public int Id { get; set; }
2022-04-11 18:00:34 +05:00
[Column("id_file"), Comment("id файла")]
public int IdFile { get; set; }
2022-04-11 18:00:34 +05:00
[Column("id_mark_type"), Comment("0 - отклонен, 1 - согласован")]
public int IdMarkType { get; set; }
2022-04-11 18:00:34 +05:00
[Column("date_created", TypeName = "timestamp with time zone"), Comment("Дата совершенного действия")]
public DateTimeOffset DateCreated { get; set; }
2022-04-11 18:00:34 +05:00
[Column("id_user"), Comment("id пользователя")]
public int IdUser { get; set; }
[Column("comment"), Comment("Комментарий")]
[StringLength(255)]
public string? Comment { get; set; }
2022-04-11 18:00:34 +05:00
[Column("is_deleted"), Comment("Помечен ли файл как удаленный")]
public bool IsDeleted { get; set; }
2022-04-11 18:00:34 +05:00
[JsonIgnore]
[ForeignKey(nameof(IdUser))]
public virtual User User { get; set; } = null!;
2022-04-11 18:00:34 +05:00
[JsonIgnore]
[ForeignKey(nameof(IdFile))]
public virtual FileInfo FileInfo { get; set; } = null!;
}
}