package com.crm.manager.controller;

import com.crm.login.rely.backend.controller.BaseLoginController;
import com.crm.manager.service.AccountApplyPasswordResetFeignService;
import com.crm.rely.backend.core.constant.FeignClientAnnotation;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.model.entity.account.apply.password.reset.AccountApplyPasswordResetAddEntity;
import com.crm.rely.backend.model.pojo.table.CustomLoginAssetManagementTable;
import com.crm.rely.backend.model.pojo.table.CustomLoginDemoTable;
import com.crm.rely.backend.model.pojo.table.CustomLoginFirmOfferTable;
import com.crm.rely.backend.model.pojo.view.CustomLoginView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account/password/reset")
public class AccountApplyPasswordResetController extends BaseLoginController {

    @Autowired
    private AccountApplyPasswordResetFeignService feignService;

    @PostMapping("/apply")
    public BaseResultDto<Object> apply(@RequestBody @Validated AccountApplyPasswordResetAddEntity entity) throws Exception {

        return feignService.add(entity);
    }

}
