Complete Category and SubCategory Base Actions, and also ControllersBase and their Implemented Usages ...
This commit is contained in:
@@ -1,10 +1,129 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xCategoryService.Models.Dtos;
|
||||
using xCategoryService.Models.Entities;
|
||||
using xCategoryService.Providers.Dtos;
|
||||
using xModels.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xCategoryService.Interfaces
|
||||
{
|
||||
public interface IXSubCategoryProviderController: IXBaseProvidedController<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{ }
|
||||
public interface IXSubCategoryProviderController : IXBaseProvidedController<XSubCategory, XSubCategoryDto, int, XSubCategoryDtoHub>
|
||||
{
|
||||
/// <summary>
|
||||
/// Check Has Specified Locale or not ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}/HasLocale")]
|
||||
Task<ActionResult<bool>> HasLocale(
|
||||
[FromRoute] int id,
|
||||
[FromQuery] string language,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Load an Item by all of it's Related Translations ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/{id}")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> GetResource(
|
||||
[FromRoute] int id,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Add(
|
||||
[FromBody] XSubCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update a Category Item for Specified Language ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("Resources/{id}")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Update(
|
||||
[FromRoute] int id,
|
||||
[FromBody] XSubCategoryDto item,
|
||||
[FromQuery] string language = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Refresh a Resource ...
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Resources/Refresh")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> Refresh(
|
||||
[FromBody] XSubCategoryResourceDto resource,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get All Resources ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/All")]
|
||||
Task<ActionResult<IEnumerable<XSubCategoryResourceDto>>> GetAllResources(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find One Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/One")]
|
||||
Task<ActionResult<XSubCategoryResourceDto>> FindOneResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Find Many Resource ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Find/Many")]
|
||||
Task<ActionResult<IEnumerable<XSubCategoryResourceDto>>> FindManyResource(
|
||||
[FromQuery] string query,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Resources by Query Pattern ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Resources/Query")]
|
||||
Task<ActionResult<XQueryResult<XSubCategoryResourceDto>>> QueryResources(
|
||||
[FromQuery] XQuery query = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user