28 lines
667 B
C#
28 lines
667 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace GazpromApp.Models;
|
|
public class Image
|
|
{
|
|
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[JsonIgnore]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public byte[] Bytes { get; set; } = [];
|
|
|
|
// Foreign keys
|
|
[JsonIgnore]
|
|
public int? PointId { get; set; }
|
|
[JsonIgnore]
|
|
public int? EquipmentId { get; set; }
|
|
|
|
// Navigation Properties
|
|
[JsonIgnore]
|
|
public Point? Point { get; set; }
|
|
[JsonIgnore]
|
|
public Equipment? Equipment { get; set; }
|
|
} |