first commit

This commit is contained in:
2025-02-26 23:42:19 +01:00
commit 777ea98be1
283 changed files with 88266 additions and 0 deletions
@@ -0,0 +1,23 @@
namespace OpenWarehouse.warehouse.api.Model;
public class ActionResult
{
public ActionResult(bool isSuccess, Dictionary<string, string>? errors)
{
IsSuccess = isSuccess;
Errors = errors;
}
public ActionResult(bool isSuccess) : this(isSuccess, null)
{
}
public ActionResult() : this(true,null)
{
}
public bool IsSuccess { get; }
public Dictionary<string, string>? Errors { get; }
}
@@ -0,0 +1,8 @@
namespace OpenWarehouse.warehouse.api.Model.Item;
public class CreateItemRequest
{
public string? ItemName { get; set; }
public string? ProducerName { get; set; }
public List<string> Tags { get; set; } = new();
}
@@ -0,0 +1,7 @@
namespace OpenWarehouse.warehouse.api.Model.Item;
public class CreateItemRespond
{
public bool Success { get; set; }
public Dictionary<string, string> Errors { get; set; } = new();
}
@@ -0,0 +1,8 @@
using Newtonsoft.Json;
namespace OpenWarehouse.warehouse.api.Model.Item;
public class CreateTagTreeRequest
{
public List<ItemCategoryTag>? ItemCategoryTagsList { get; set; }
}
@@ -0,0 +1,9 @@
using System.Reflection;
namespace OpenWarehouse.warehouse.api.Model.Item;
public class CreateTagTreeRespond
{
public string? TaskId { get; set; }
public bool? CreatedSuccess { get; set; }
}
@@ -0,0 +1,7 @@
namespace OpenWarehouse.warehouse.api.Model.Item;
public class ItemCategoryTag()
{
public string? ParentName { get; set; }
public string? Name { get; set; }
}
@@ -0,0 +1,31 @@
using NJsonSchema.Annotations;
namespace OpenWarehouse.warehouse.api.Model.Item;
public class ClaimValueModel
{
public string? Value { get; set; }
public string? Issuer { get; set; }
}
public class ItemModel
{
[NotNull, MaxLength(30), Required]
public string? Id { get; set; }
[NotNull, MaxLength(30), Required]
public string? Name { get; set; }
[NotNull, MaxLength(30), Required]
public string? ProducerId { get; set; }
[NotNull, MaxLength(30), Required]
public string? ProducerName { get; set; }
[Required]
public Dictionary<string, ClaimValueModel>? Claims { get; set; }
[Required]
public List<string>? CategoryTag { get; set; }
}
@@ -0,0 +1,7 @@
namespace OpenWarehouse.warehouse.api.Model.Item;
public class TagTreeModel
{
public string? Name { get; init; }
public List<TagTreeModel> Child { get; } = new();
}
@@ -0,0 +1,8 @@
namespace OpenWarehouse.warehouse.api.Model.Item;
public class UpdateItemClaimRequest
{
public string? ItemId { get; set; }
public List<ClaimBase> ListOfUpdatedClaims { get; set; } = new List<ClaimBase>();
}
@@ -0,0 +1,12 @@
namespace OpenWarehouse.warehouse.api.Model.Producer;
public class Producer
{
public string? Name { get; set; }
public string? FirstLineAddress { get; set; }
public string? SecondLineAddress { get; set; }
public string? Email { get; set; }
public string? PhoneNumber { get; set; }
public List<ClaimBase>? Claims { get; set; }
}
@@ -0,0 +1,9 @@
namespace OpenWarehouse.warehouse.api.Model.Producer;
public class UpdateClaimRequest
{
public Guid? Id { get; set; }
public string? Name { get; set; }
public List<ClaimBase> ListOfUpdateClaim { get; set; } = new();
}
@@ -0,0 +1,11 @@
using NJsonSchema.Annotations;
namespace OpenWarehouse.warehouse.api.Model.Tool;
public class InitializationModel
{
[NotNull]
public string? Login { get; set; }
[NotNull]
public string? Password { get; set; }
}
@@ -0,0 +1,14 @@
using System.ComponentModel;
namespace OpenWarehouse.warehouse.api.Model.Tool;
public class InitialziationResultModel
{
[DefaultValue(false)]
public bool IsAlreadyInitialized { get; set; }
[DefaultValue(false)]
public bool Success { get; set; }
[DefaultValue(false)]
public bool TestAuthSuccess { get; set; }
public string? ServiceAccountName { get; set; }
}