Skip to content

Commit

Permalink
feat: Добавить в классы записи лога и ссылки записи лога путь и призн…
Browse files Browse the repository at this point in the history
…аки основной записи ссылки, добавить команду управления основнной ссылкой записи лога
  • Loading branch information
firstDismay committed Dec 24, 2023
1 parent 8663347 commit bcec70a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
58 changes: 58 additions & 0 deletions command/logging/message/upd/log_set_main_link.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using Npgsql;
using NpgsqlTypes;

namespace ManDI.command.logging.message.upd
{
/// <summary>
/// Команда обновляет запись журнала
/// </summary>
public class log_set_main_link : IParametersFunction
{
/// <summary>
/// Идентификатор записи
/// </summary>
public long iid_log { get; set; }

/// <summary>
/// Идентификатор новой основной ссылки записи лога
/// </summary>
public long iid_log_link { get; set; }



/// <summary>
/// Список параметров функции
/// </summary>
public IEnumerable<NpgsqlParameter> Parameters
{
get
{
NpgsqlParameter Parameter;
List<NpgsqlParameter> ListParameter = new List<NpgsqlParameter>();

Parameter = new NpgsqlParameter("iid_log", NpgsqlDbType.Bigint);
Parameter.Value = iid_log;
ListParameter.Add(Parameter);

Parameter = new NpgsqlParameter("iid_log_link", NpgsqlDbType.Bigint);
Parameter.Value = iid_log_link;
ListParameter.Add(Parameter);

return ListParameter;
}
}

/// <summary>
/// Наименование функции API
/// </summary>
public string NameFunction
{
get
{
return "log_set_main_link";
}
}

public string? Condition { get; set; }
}
}
8 changes: 6 additions & 2 deletions composite/entities/logging/vlog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace ManDI.composite.entities.vlog
using System;

namespace ManDI.composite.entities.vlog
{
/// <summary>
/// Композитный тип записи журнала
Expand All @@ -18,5 +20,7 @@ public class vlog
public string body { get; set; }
public string user_author { get; set; }
public DateTime datetime { get; set; }
public string path { get; set; }
public long main_log_link { get; set; }
}
}
}
2 changes: 2 additions & 0 deletions composite/entities/logging/vlog_link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ public class vlog_link
public int id_entity { get; set; }
public long id_entity_instance { get; set; }
public long id_sub_entity_instance { get; set; }
public string path { get; set; }
public bool is_main_link { get; set; }
}
}

0 comments on commit bcec70a

Please sign in to comment.