Init
This commit is contained in:
14
Prefab.Base/Catalog/Attributes/AttributeRules.cs
Normal file
14
Prefab.Base/Catalog/Attributes/AttributeRules.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Prefab.Base.Catalog.Attributes;
|
||||
|
||||
public static class AttributeDefinitionRules
|
||||
{
|
||||
public const int NameMaxLength = 256;
|
||||
public const int UnitMaxLength = 32;
|
||||
}
|
||||
|
||||
public static class ProductAttributeValueRules
|
||||
{
|
||||
public const int ValueMaxLength = 1024;
|
||||
public const int UnitCodeMaxLength = 32;
|
||||
public const int EnumCodeMaxLength = 64;
|
||||
}
|
||||
11
Prefab.Base/Catalog/Categories/CategoryRules.cs
Normal file
11
Prefab.Base/Catalog/Categories/CategoryRules.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Prefab.Base.Catalog.Categories;
|
||||
|
||||
public class CategoryRules
|
||||
{
|
||||
public const int NameMaxLength = 100;
|
||||
public const int DescriptionMaxLength = 500;
|
||||
|
||||
public const int SlugMaxLength = 128;
|
||||
public const int HeroImageUrlMaxLength = 512;
|
||||
public const int IconMaxLength = 128;
|
||||
}
|
||||
14
Prefab.Base/Catalog/Options/OptionRules.cs
Normal file
14
Prefab.Base/Catalog/Options/OptionRules.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Prefab.Base.Catalog.Options;
|
||||
|
||||
public static class OptionDefinitionRules
|
||||
{
|
||||
public const int CodeMaxLength = 64;
|
||||
public const int NameMaxLength = 256;
|
||||
public const int UnitMaxLength = 32;
|
||||
}
|
||||
|
||||
public static class OptionValueRules
|
||||
{
|
||||
public const int CodeMaxLength = 64;
|
||||
public const int LabelMaxLength = 256;
|
||||
}
|
||||
10
Prefab.Base/Catalog/Products/ProductRules.cs
Normal file
10
Prefab.Base/Catalog/Products/ProductRules.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Prefab.Base.Catalog.Products;
|
||||
|
||||
public static class ProductRules
|
||||
{
|
||||
public const int NameMaxLength = 256;
|
||||
public const int SlugMaxLength = 256;
|
||||
public const int SkuMaxLength = 64;
|
||||
public const int DescriptionMaxLength = 2048;
|
||||
public const string SlugPattern = "^[a-z0-9]+(?:-[a-z0-9]+)*$";
|
||||
}
|
||||
Reference in New Issue
Block a user