using BBM.ChatGLM.Dtos;
using BBM.ChatGLM.PromptWordType;
using Volo.Abp.Application.Dtos;

namespace BBM.ChatGLM.Controllers
{
    [Route("PromptWordTypes")]
    public class PromptWordTypesController : ChatGLMController, IPromptWordTypesAppService
    {
        private readonly IPromptWordTypesAppService _promptWordTypesAppService;
        public PromptWordTypesController(IPromptWordTypesAppService promptWordTypesAppService)
        {
            _promptWordTypesAppService = promptWordTypesAppService;
        }

        [HttpPost("create")]
        public async Task<PromptWordTypeDto> CreateAsync([FromBody] PromptWordTypeCreateInput input)
        {
            return await _promptWordTypesAppService.CreateAsync(input);
        }

        [HttpPost("delete")]
        public async Task<int> DeleteAsync([FromBody] GuidIdInput input)
        {
            return await _promptWordTypesAppService.DeleteAsync(input);
        }

        [HttpPost("page")]
        public async Task<PagedResultDto<PromptWordTypeDto>> PageAsync([FromBody] PromptWordTypePageInput input)
        {
            return await _promptWordTypesAppService.PageAsync(input);
        }

        [HttpPost("update")]
        public async Task<PromptWordTypeDto> UpdateAsync([FromBody] PromptWordTypeUpdateInput input)
        {
            return await _promptWordTypesAppService.UpdateAsync(input);
        }

        [HttpPost("type")]
        public async Task<List<string>> Top1000Async()
        {
            return await _promptWordTypesAppService.Top1000Async();
        }
    }
}
