Add new Backend structure with proper .NET 8 projects

This commit is contained in:
Michał Zieliński
2025-05-31 19:26:02 +02:00
parent 976922fafc
commit 9d1adef629
75 changed files with 11503 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace DiunaBI.Core.Models;
public enum LayerType
{
Import,
Processed,
Administration,
Dictionary,
}
public class Layer
{
#region Properties
[Key]
public Guid Id { get; init; }
[Required]
public int Number { get; init; }
[Required]
[MaxLength(50)]
public string? Name { get; set; }
[Required]
public LayerType Type { get; init; }
[Required]
public DateTime CreatedAt { get; set; }
[Required]
public DateTime ModifiedAt { get; set; }
[Required]
public bool IsDeleted { get; init; } = false;
[Required]
public bool IsCancelled { get; init; } = false;
#endregion
#region Relations
public ICollection<Record>? Records { get; init; }
[Required]
public Guid CreatedById { get; set; }
public User? CreatedBy { get; init; }
[Required]
public Guid ModifiedById { get; set; }
public User? ModifiedBy { get; init; }
public Guid? ParentId { get; init; }
public Layer? Parent { get; init; }
#endregion
}