using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_Core.Const;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.HttpContextUser;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model;
using WIDESEAWCS_Model.Models;

namespace WIDESEAWCS_WCSServer.Controllers
{
    [Route("api/tenant")]
    [ApiController]
    public class Sys_TenantController : ApiBaseController<ISys_TenantService, Sys_Tenant>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;

        public Sys_TenantController(ISys_TenantService tenantService, IHttpContextAccessor httpContextAccessor) : base(tenantService)
        {
            _httpContextAccessor = httpContextAccessor;
        }

        [HttpGet, Route("initTenantInfo"), AllowAnonymous]
        public WebResponseContent InitTenantInfo(string tenantName, int tenantType)
        {
            return Service.InitTenantInfo(tenantName, tenantType);
        }
    }
}