Создание таблиц для цепочек подтверждения (#1)
Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz> Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tnsu.ApprovalRoute.Domain.Entities;
|
||||
|
||||
public class RequestType
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string PageUrl { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Route> Routes { get; set; } = new List<Route>();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Tnsu.ApprovalRoute.Domain.Enums;
|
||||
|
||||
namespace Tnsu.ApprovalRoute.Domain.Entities;
|
||||
|
||||
public class Route
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public RouteType RouteType { get; set; } = RouteType.Sequential;
|
||||
public Guid RequestTypeId { get; set; }
|
||||
|
||||
// Внешние справочники (1С/ZUP) — хранятся как ссылки без FK в этой БД.
|
||||
public Guid DepartmentId { get; set; }
|
||||
public Guid CompanyId { get; set; }
|
||||
public bool ByProject { get; set; }
|
||||
|
||||
public bool RequiresControl { get; set; }
|
||||
|
||||
public RequestType? RequestType { get; set; }
|
||||
public ICollection<RouteStep> Steps { get; set; } = new List<RouteStep>();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Tnsu.ApprovalRoute.Domain.Enums;
|
||||
|
||||
namespace Tnsu.ApprovalRoute.Domain.Entities;
|
||||
|
||||
public class RouteStep
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public int OrderNo { get; set; }
|
||||
|
||||
// Внешняя ссылка на пользователя (1С/ZUP) — без локальной таблицы Users.
|
||||
public string ExecutorEmail { get; set; } = string.Empty;
|
||||
public string Position { get; set; } = string.Empty;
|
||||
public ProjectRole ProjectRole { get; set; } = ProjectRole.None;
|
||||
|
||||
public RouteStepStatus Status { get; set; } = RouteStepStatus.Draft;
|
||||
public Guid RouteId { get; set; }
|
||||
public bool AllowReassignToOtherApprovers { get; set; }
|
||||
|
||||
public Route? Route { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Tnsu.ApprovalRoute.Domain.Enums;
|
||||
|
||||
public enum ProjectRole
|
||||
{
|
||||
None,
|
||||
Manager,
|
||||
Engineer,
|
||||
Observer
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Tnsu.ApprovalRoute.Domain.Enums;
|
||||
|
||||
public enum RouteStepStatus
|
||||
{
|
||||
None,
|
||||
Draft,
|
||||
OnApproval,
|
||||
Approved,
|
||||
InExecution,
|
||||
Completed,
|
||||
Returned,
|
||||
Closed
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Tnsu.ApprovalRoute.Domain.Enums;
|
||||
|
||||
public enum RouteType
|
||||
{
|
||||
None,
|
||||
Parallel,
|
||||
Sequential
|
||||
}
|
||||
Reference in New Issue
Block a user