Skip to content

Commit

Permalink
chore: libs folder (#50)
Browse files Browse the repository at this point in the history
* chore: libs folder

* chore: libs

* chore: libs folder

* chore: fmt
  • Loading branch information
eugbyte authored Oct 12, 2024
1 parent 03d32d8 commit 16fcce4
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions src/StoreOnWheels.Server/Controllers/GeohubsClient.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Caching;
using Microsoft.AspNetCore.SignalR;
using Newtonsoft.Json;
using StoreOnWheels.Server.Domains.Interfaces;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Interfaces;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Controllers;

Expand Down
4 changes: 2 additions & 2 deletions src/StoreOnWheels.Server/Controllers/VendorsController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Caching;
using Microsoft.AspNetCore.Mvc;
using StoreOnWheels.Server.Domains.Interfaces;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Interfaces;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Controllers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Configs;
namespace StoreOnWheels.Server.Libs.Configs;

public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options) {
public DbSet<Vendor> Vendors { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;

namespace StoreOnWheels.Server.Configs;
namespace StoreOnWheels.Server.Libs.Configs;
/// <summary>
/// Deprecated. Sql migration to run in a separate script in CI/CD pipeline.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace StoreOnWheels.Server.Domains.Interfaces;
namespace StoreOnWheels.Server.Libs.Domains.Interfaces;

public interface IGeoHubClient {
Task MessageReceived(string userId, string message);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Domains.Interfaces;
namespace StoreOnWheels.Server.Libs.Domains.Interfaces;

public interface IVendorService {
Task<Vendor?> Get(string vendorId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace StoreOnWheels.Server.Domains.Models;
namespace StoreOnWheels.Server.Libs.Domains.Models;

public class GeolocationCoordinate {
public float Latitude { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace StoreOnWheels.Server.Domains.Models;
namespace StoreOnWheels.Server.Libs.Domains.Models;

public class GeolocationPosition {
public string VendorId { get; set; } = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;

namespace StoreOnWheels.Server.Domains.Models;
namespace StoreOnWheels.Server.Libs.Domains.Models;

[Index(nameof(DisplayName), IsUnique = true)]
public class Vendor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.SignalR;
using StoreOnWheels.Server.Controllers;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Services.BackgroundServices;
namespace StoreOnWheels.Server.Libs.Services.BackgroundServices;

public class MockPositionEmitter(
IHubContext<GeohubsClient> hubContext) : BackgroundService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using StoreOnWheels.Server.Configs;
using StoreOnWheels.Server.Domains.Interfaces;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Configs;
using StoreOnWheels.Server.Libs.Domains.Interfaces;
using StoreOnWheels.Server.Libs.Domains.Models;

namespace StoreOnWheels.Server.Services;
namespace StoreOnWheels.Server.Libs.Services;

public class VendorService(AppDbContext db) : IVendorService {
public async Task<Vendor?> Get(string vendorId) => await db.Vendors.FindAsync(vendorId);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using StoreOnWheels.Server.Configs;
using StoreOnWheels.Server.Libs.Configs;


#nullable disable
Expand Down
10 changes: 5 additions & 5 deletions src/StoreOnWheels.Server/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Caching;
using Microsoft.EntityFrameworkCore;
using StoreOnWheels.Server.Configs;
using StoreOnWheels.Server.Controllers;
using StoreOnWheels.Server.Domains.Interfaces;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Services;
using StoreOnWheels.Server.Services.BackgroundServices;
using StoreOnWheels.Server.Libs.Configs;
using StoreOnWheels.Server.Libs.Domains.Interfaces;
using StoreOnWheels.Server.Libs.Domains.Models;
using StoreOnWheels.Server.Libs.Services;
using StoreOnWheels.Server.Libs.Services.BackgroundServices;

var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddEnvironmentVariables();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.SignalR.Client;
using Newtonsoft.Json;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Models;
using Xunit.Abstractions;

namespace StoreOnWheels.Server.Test.Integration.Controllers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc.Testing;
using Newtonsoft.Json;
using StoreOnWheels.Server.Domains.Models;
using StoreOnWheels.Server.Libs.Domains.Models;
using System.Net;
using System.Net.Http.Json;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using StoreOnWheels.Server.Configs;
using StoreOnWheels.Server.Libs.Configs;
using System.Data.Common;

namespace StoreOnWheels.Server.Test.Integration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.SignalR.Client;
using Xunit.Abstractions;

namespace StoreOnWheels.Server.Test.Integration.Services;
namespace StoreOnWheels.Server.Test.Integration.Libs.Services;

public class TestMockPositionEmitter(
CustomWebAppFactory<Program> factory,
Expand Down

0 comments on commit 16fcce4

Please sign in to comment.