update
This commit is contained in:
24
src/CMSMicroservice.Domain/Entities/Category.cs
Normal file
24
src/CMSMicroservice.Domain/Entities/Category.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace CMSMicroservice.Domain.Entities;
|
||||
//دسته بندی
|
||||
public class Category : BaseAuditableEntity
|
||||
{
|
||||
//نام لاتین
|
||||
public string Name { get; set; }
|
||||
//عنوان
|
||||
public string Title { get; set; }
|
||||
//توضیحات
|
||||
public string? Description { get; set; }
|
||||
//آدرس تصویر
|
||||
public string? ImagePath { get; set; }
|
||||
//شناسه والد
|
||||
public long? ParentId { get; set; }
|
||||
//Category Navigation Property
|
||||
public virtual Category? Parent { get; set; }
|
||||
//Category Collection Navigation Reference
|
||||
public virtual ICollection<Category> Categories { get; set; }
|
||||
//فعال؟
|
||||
public bool IsActive { get; set; }
|
||||
//ترتیب نمایش
|
||||
public int SortOrder { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace CMSMicroservice.Domain.Events;
|
||||
public class CreateNewCategoryEvent : BaseEvent
|
||||
{
|
||||
public CreateNewCategoryEvent(Category item)
|
||||
{
|
||||
Item = item;
|
||||
}
|
||||
|
||||
public Category Item { get; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace CMSMicroservice.Domain.Events;
|
||||
public class DeleteCategoryEvent : BaseEvent
|
||||
{
|
||||
public DeleteCategoryEvent(Category item)
|
||||
{
|
||||
Item = item;
|
||||
}
|
||||
|
||||
public Category Item { get; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace CMSMicroservice.Domain.Events;
|
||||
public class UpdateCategoryEvent : BaseEvent
|
||||
{
|
||||
public UpdateCategoryEvent(Category item)
|
||||
{
|
||||
Item = item;
|
||||
}
|
||||
|
||||
public Category Item { get; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user