變更名稱

This commit is contained in:
威勝 張 2024-03-05 19:49:58 +08:00
parent 1563577166
commit a2ca6b3b7e
60 changed files with 145 additions and 144 deletions

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Authorization;
namespace Parking_space_WebAPI.Authorization;
[AttributeUsage(AttributeTargets.Method)]
public class AllowAnonymousAttribute : Attribute

View File

@ -1,8 +1,8 @@
namespace WebApi_data_value.Authorization;
namespace Parking_space_WebAPI.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using WebApi_data_value.Entities;
using Parking_space_WebAPI.Entities;
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class AuthorizeAttribute : Attribute, IAuthorizationFilter

View File

@ -1,6 +1,6 @@
namespace WebApi_data_value.Authorization;
namespace Parking_space_WebAPI.Authorization;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Services;
public class JwtMiddleware
{

View File

@ -1,12 +1,12 @@
namespace WebApi_data_value.Authorization;
namespace Parking_space_WebAPI.Authorization;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using WebApi_data_value.Entities;
using WebApi_data_value.Helpers;
using Parking_space_WebAPI.Entities;
using Parking_space_WebAPI.Helpers;
public interface IJwtUtils
{

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,14 +5,14 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using WebApi_data_value.ViewModel;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -6,11 +6,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Authorization;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.ViewModel;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -6,12 +6,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using WebApi_data_value.ViewModel;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using WebApi_data_value.ViewModel;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.ViewModel;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -6,11 +6,11 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MySqlX.XDevAPI.Common;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -6,9 +6,9 @@ using Mysqlx;
using Newtonsoft.Json.Linq;
using NuGet.Common;
using System.IdentityModel.Tokens.Jwt;
using WebApi_data_value.Authorization;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
[ApiController]
[Authorize]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.ViewModel;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,11 +5,11 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Services;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]

View File

@ -5,12 +5,12 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Services;
using Parking_space_WebAPI.ViewModel;
using Parking_space_WebAPI.Authorization;
namespace WebApi_data_value.Controllers
namespace Parking_space_WebAPI.Controllers
{
[Route("api/[controller]")]

View File

@ -8,17 +8,17 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["WebApi_data_value/WebApi_data_value.csproj", "WebApi_data_value/"]
RUN dotnet restore "./WebApi_data_value/./WebApi_data_value.csproj"
COPY ["Parking_space_WebAPI/Parking_space_WebAPI.csproj", "Parking_space_WebAPI/"]
RUN dotnet restore "./Parking_space_WebAPI/./Parking_space_WebAPI.csproj"
COPY . .
WORKDIR "/src/WebApi_data_value"
RUN dotnet build "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/build
WORKDIR "/src/Parking_space_WebAPI"
RUN dotnet build "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApi_data_value.dll"]
ENTRYPOINT ["dotnet", "Parking_space_WebAPI.dll"]

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Entities;
namespace Parking_space_WebAPI.Entities;
using MessagePack;
using System.Text.Json.Serialization;

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Helpers;
namespace Parking_space_WebAPI.Helpers;
public class AppSettings
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models;
namespace Parking_space_WebAPI.Models;
using System.ComponentModel.DataAnnotations;

View File

@ -1,6 +1,6 @@
namespace WebApi_data_value.Models;
namespace Parking_space_WebAPI.Models;
using WebApi_data_value.Entities;
using Parking_space_WebAPI.Entities;
public class AuthenticateResponse
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_space_algorithm
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_cam
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_cam_ptz
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_cam_ptz_car_num_check
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_cam_ptz_pass
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_cam_ptz_violation
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_history
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_instant
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_lcd_instand
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_roi
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_roi_car_num_check
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_roi_pass
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_roi_violation
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_total_table
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Parking_spaces_violation_total_table
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Violation_car_table
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Yuntech_cam
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Yuntech_cam_total_table
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.Models
namespace Parking_space_WebAPI.Models
{
public class Yuntech_in_car_table
{

View File

@ -7,9 +7,9 @@ using Microsoft.OpenApi.Models;
using System.Configuration;
using System.Reflection;
using System.Text;
using WebApi_data_value.Authorization;
using WebApi_data_value.Helpers;
using WebApi_data_value.Services;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Helpers;
using Parking_space_WebAPI.Services;
var builder = WebApplication.CreateBuilder(args);
//在 ASP.NET Core 中啟用 CORS (跨原始來源要求)
builder.Services.AddCors();
@ -29,7 +29,8 @@ builder.Services.AddDbContext<SqlContext>(opt =>
string connectionString = builder.Configuration.GetConnectionString("tarefasConnection");
var serverVersion = ServerVersion.AutoDetect(connectionString);
opt.UseMySql(connectionString, serverVersion);
});*/
});
*/
//身分驗證
@ -61,7 +62,7 @@ builder.Services.AddDbContext<SqlContext>(opt =>
});
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApi_data_value", Version = "v1" });
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Parking_space_WebAPI", Version = "v1" });
// Configure Swagger to use JWT authentication
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme

View File

@ -1,6 +1,6 @@
{
"profiles": {
"WebApi_data_value": {
"Parking_space_WebAPI": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",

View File

@ -4,11 +4,11 @@ using System.Linq;
using Microsoft.Extensions.Configuration.Json;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Entities;
using Parking_space_WebAPI.Models;
using Parking_space_WebAPI.Entities;
namespace WebApi_data_value.Services
namespace Parking_space_WebAPI.Services
{
public class SqlContext : DbContext
{

View File

@ -1,8 +1,8 @@
namespace WebApi_data_value.Services;
namespace Parking_space_WebAPI.Services;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Authorization;
using WebApi_data_value.Entities;
using WebApi_data_value.Models;
using Parking_space_WebAPI.Authorization;
using Parking_space_WebAPI.Entities;
using Parking_space_WebAPI.Models;
public interface IUserService
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel
namespace Parking_space_WebAPI.ViewModel
{
public class Single_Parking_spaces
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel
namespace Parking_space_WebAPI.ViewModel
{
public class Single_license_plate_number
{

View File

@ -1,4 +1,4 @@
namespace WebApi_data_value.ViewModel
namespace Parking_space_WebAPI.ViewModel
{
public class Single_violation_car_table
{

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm
@model Parking_space_WebAPI.Models.Parking_space_algorithm
@{
ViewData["Title"] = "Create";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm
@model Parking_space_WebAPI.Models.Parking_space_algorithm
@{
ViewData["Title"] = "Delete";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm
@model Parking_space_WebAPI.Models.Parking_space_algorithm
@{
ViewData["Title"] = "Details";

View File

@ -1,4 +1,4 @@
@model WebApi_data_value.Models.Parking_space_algorithm
@model Parking_space_WebAPI.Models.Parking_space_algorithm
@{
ViewData["Title"] = "Edit";

View File

@ -1,4 +1,4 @@
@model IEnumerable<WebApi_data_value.Models.Parking_space_algorithm>
@model IEnumerable<Parking_space_WebAPI.Models.Parking_space_algorithm>
@{
ViewData["Title"] = "Index";