after refactor cleanup
This commit is contained in:
10
DiunaBI.Domain/DiunaBI.Domain.csproj
Normal file
10
DiunaBI.Domain/DiunaBI.Domain.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>13.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
15
DiunaBI.Domain/Entities/DataInbox.cs
Normal file
15
DiunaBI.Domain/Entities/DataInbox.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class DataInbox
|
||||
{
|
||||
#region Properties
|
||||
public Guid Id { get; set; }
|
||||
public required string Name { get; init; }
|
||||
public required string Source { get; set; }
|
||||
public required string Data { get; init; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
#endregion
|
||||
}
|
||||
34
DiunaBI.Domain/Entities/Layer.cs
Normal file
34
DiunaBI.Domain/Entities/Layer.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public enum LayerType
|
||||
{
|
||||
Import,
|
||||
Processed,
|
||||
Administration,
|
||||
Dictionary,
|
||||
}
|
||||
public class Layer
|
||||
{
|
||||
#region Properties
|
||||
public Guid Id { get; init; }
|
||||
public int Number { get; init; }
|
||||
public string? Name { get; set; }
|
||||
public LayerType Type { get; init; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime ModifiedAt { get; set; }
|
||||
public bool IsDeleted { get; init; } = false;
|
||||
public bool IsCancelled { get; init; } = false;
|
||||
#endregion
|
||||
#region Relations
|
||||
public ICollection<Record>? Records { get; init; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public User? CreatedBy { get; init; }
|
||||
public Guid ModifiedById { get; set; }
|
||||
public User? ModifiedBy { get; init; }
|
||||
public Guid? ParentId { get; init; }
|
||||
#endregion
|
||||
}
|
||||
13
DiunaBI.Domain/Entities/ProcessSource.cs
Normal file
13
DiunaBI.Domain/Entities/ProcessSource.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class ProcessSource
|
||||
{
|
||||
#region Relations
|
||||
public Guid LayerId { get; init; }
|
||||
public Guid SourceId { get; init; }
|
||||
public Layer? Source { get; init; }
|
||||
#endregion
|
||||
}
|
||||
40
DiunaBI.Domain/Entities/QueueJob.cs
Normal file
40
DiunaBI.Domain/Entities/QueueJob.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class QueueJob
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid LayerId { get; set; }
|
||||
public string LayerName { get; set; } = string.Empty;
|
||||
public string PluginName { get; set; } = string.Empty;
|
||||
public JobType JobType { get; set; }
|
||||
public int Priority { get; set; } = 0; // 0 = highest priority
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public int RetryCount { get; set; } = 0;
|
||||
public int MaxRetries { get; set; } = 5;
|
||||
public JobStatus Status { get; set; } = JobStatus.Pending;
|
||||
public string? LastError { get; set; }
|
||||
public DateTime? LastAttemptAt { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
|
||||
public Guid ModifiedById { get; set; }
|
||||
public DateTime ModifiedAtUtc { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public enum JobType
|
||||
{
|
||||
Import = 0,
|
||||
Process = 1
|
||||
}
|
||||
|
||||
public enum JobStatus
|
||||
{
|
||||
Pending,
|
||||
Running,
|
||||
Completed,
|
||||
Failed,
|
||||
Retrying
|
||||
}
|
||||
55
DiunaBI.Domain/Entities/Record.cs
Normal file
55
DiunaBI.Domain/Entities/Record.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class Record
|
||||
{
|
||||
#region Properties
|
||||
public Guid Id { get; set; }
|
||||
public string? Code { get; init; }
|
||||
public double? Value1 { get; set; }
|
||||
public double? Value2 { get; set; }
|
||||
public double? Value3 { get; set; }
|
||||
public double? Value4 { get; set; }
|
||||
public double? Value5 { get; set; }
|
||||
public double? Value6 { get; set; }
|
||||
public double? Value7 { get; set; }
|
||||
public double? Value8 { get; set; }
|
||||
public double? Value9 { get; set; }
|
||||
public double? Value10 { get; set; }
|
||||
public double? Value11 { get; set; }
|
||||
public double? Value12 { get; set; }
|
||||
public double? Value13 { get; set; }
|
||||
public double? Value14 { get; set; }
|
||||
public double? Value15 { get; set; }
|
||||
public double? Value16 { get; set; }
|
||||
public double? Value17 { get; set; }
|
||||
public double? Value18 { get; set; }
|
||||
public double? Value19 { get; set; }
|
||||
public double? Value20 { get; set; }
|
||||
public double? Value21 { get; set; }
|
||||
public double? Value22 { get; set; }
|
||||
public double? Value23 { get; set; }
|
||||
public double? Value24 { get; set; }
|
||||
public double? Value25 { get; set; }
|
||||
public double? Value26 { get; set; }
|
||||
public double? Value27 { get; set; }
|
||||
public double? Value28 { get; set; }
|
||||
public double? Value29 { get; set; }
|
||||
public double? Value30 { get; set; }
|
||||
public double? Value31 { get; set; }
|
||||
public double? Value32 { get; set; }
|
||||
public string? Desc1 { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime ModifiedAt { get; set; }
|
||||
public bool IsDeleted { get; init; }
|
||||
#endregion
|
||||
#region Relations
|
||||
public Guid CreatedById { get; set; }
|
||||
public User? CreatedBy { get; init; }
|
||||
public Guid ModifiedById { get; set; }
|
||||
public User? ModifiedBy { get; init; }
|
||||
public Guid LayerId { get; set; }
|
||||
#endregion
|
||||
}
|
||||
14
DiunaBI.Domain/Entities/User.cs
Normal file
14
DiunaBI.Domain/Entities/User.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class User
|
||||
{
|
||||
#region Properties
|
||||
public Guid Id { get; init; }
|
||||
public string? Email { get; init; }
|
||||
public string? UserName { get; set; }
|
||||
public DateTime CreatedAt { get; init; }
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user