Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZOXEXIVO committed Jul 13, 2022
1 parent d6b1dbe commit 37ef059
Show file tree
Hide file tree
Showing 18 changed files with 237 additions and 217 deletions.
20 changes: 15 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ steps:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker build --no-cache -t geen:1.0.0.$$DRONE_BUILD_NUMBER -f "build/Web.Dockerfile" --build-arg BUILD_NUMBER=1.0.0.$$DRONE_BUILD_NUMBER .
- docker build --no-cache -t geen-web:1.0.0.$$DRONE_BUILD_NUMBER -f "build/Web.Dockerfile" --build-arg BUILD_NUMBER=1.0.0.$$DRONE_BUILD_NUMBER .

- name: build_jobs
image: docker:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker build --no-cache -t geen-jobs:1.0.0.$$DRONE_BUILD_NUMBER -f "build/Jobs.Dockerfile" --build-arg BUILD_NUMBER=1.0.0.$$DRONE_BUILD_NUMBER .


- name: clear
image: docker:dind
Expand All @@ -29,8 +38,8 @@ steps:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker stop geen || true
- docker rm geen || true
- docker stop geen-web || true
- docker rm geen-jobs || true

- name: deploy
image: docker:dind
Expand All @@ -41,8 +50,9 @@ steps:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker run -d -p 172.17.0.1:7000:7000 --volume /home/zoxexivo/static/htmls:/html/geen --restart always --name geen geen:1.0.0.$$DRONE_BUILD_NUMBER

- docker run -d -p 172.17.0.1:7000:7000 --volume /home/zoxexivo/static/htmls:/html/geen --restart always --name geen-web geen:1.0.0.$$DRONE_BUILD_NUMBER
- docker run -d --restart always --name geen-jobs geen-jobs:1.0.0.$$DRONE_BUILD_NUMBER

volumes:
- name: docker_sock
host:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class PlayerGetByClubUrlNameQuery : IQuery<Task<List<PlayerModel>>>
{
public string ClubUrlName { get; set; }
}

public class PlayerGetByClubUrlNameQueryHandler : IQueryHandler<PlayerGetByClubUrlNameQuery, Task<List<PlayerModel>>>
{
public class PlayerGetByClubUrlNameQuery : IQuery<Task<List<PlayerModel>>>
private readonly IPlayerRepository _playerRepository;

public PlayerGetByClubUrlNameQueryHandler(IPlayerRepository playerRepository)
{
public string ClubUrlName { get; set; }
_playerRepository = playerRepository;
}

public class PlayerGetByClubUrlNameQueryHandler : IQueryHandler<PlayerGetByClubUrlNameQuery, Task<List<PlayerModel>>>
public Task<List<PlayerModel>> Execute(PlayerGetByClubUrlNameQuery query)
{
private readonly IPlayerRepository _playerRepository;

public PlayerGetByClubUrlNameQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<List<PlayerModel>> Execute(PlayerGetByClubUrlNameQuery query)
{
return _playerRepository.GetByClubUrlName(query.ClubUrlName);
}
return _playerRepository.GetByClubUrlName(query.ClubUrlName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class GetPlayerIdsByClubAndPositionQuery : IQuery<Task<List<int>>>
{
public string ClubUrlName { get; set; }
public int Position { get; set; }
}

public class GetPlayerIdsByClubAndPositionQueryHandler : IQueryHandler<GetPlayerIdsByClubAndPositionQuery, Task<List<int>>>
{
public class GetPlayerIdsByClubAndPositionQuery : IQuery<Task<List<int>>>
private readonly IPlayerRepository _playerRepository;

public GetPlayerIdsByClubAndPositionQueryHandler(IPlayerRepository playerRepository)
{
public string ClubUrlName { get; set; }
public int Position { get; set; }
_playerRepository = playerRepository;
}

public class GetPlayerIdsByClubAndPositionQueryHandler : IQueryHandler<GetPlayerIdsByClubAndPositionQuery, Task<List<int>>>
public Task<List<int>> Execute(GetPlayerIdsByClubAndPositionQuery query)
{
private readonly IPlayerRepository _playerRepository;

public GetPlayerIdsByClubAndPositionQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<List<int>> Execute(GetPlayerIdsByClubAndPositionQuery query)
{
return _playerRepository.GetIdsByClubAndPosition(query.ClubUrlName, query.Position);
}
return _playerRepository.GetIdsByClubAndPosition(query.ClubUrlName, query.Position);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class GetPlayerModelsByIdsQuery : IQuery<Task<List<PlayerModel>>>
{
public List<int> PlayerIds { get; set; }
}

public class GetPlayerModelsByIdsQueryHandler : IQueryHandler<GetPlayerModelsByIdsQuery, Task<List<PlayerModel>>>
{
public class GetPlayerModelsByIdsQuery : IQuery<Task<List<PlayerModel>>>
private readonly IPlayerRepository _playerRepository;

public GetPlayerModelsByIdsQueryHandler(IPlayerRepository playerRepository)
{
public List<int> PlayerIds { get; set; }
_playerRepository = playerRepository;
}

public class GetPlayerModelsByIdsQueryHandler : IQueryHandler<GetPlayerModelsByIdsQuery, Task<List<PlayerModel>>>
public Task<List<PlayerModel>> Execute(GetPlayerModelsByIdsQuery query)
{
private readonly IPlayerRepository _playerRepository;

public GetPlayerModelsByIdsQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<List<PlayerModel>> Execute(GetPlayerModelsByIdsQuery query)
{
return _playerRepository.GetByIds(query.PlayerIds);
}
return _playerRepository.GetByIds(query.PlayerIds);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class GetRandomPlayerQuery : IQuery<Task<PlayerModel>>
{
}

public class GetRandomPlayerQueryHandler : IQueryHandler<GetRandomPlayerQuery, Task<PlayerModel>>
{
public class GetRandomPlayerQuery : IQuery<Task<PlayerModel>>
private readonly IPlayerRepository _playerRepository;

public GetRandomPlayerQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public class GetRandomPlayerQueryHandler : IQueryHandler<GetRandomPlayerQuery, Task<PlayerModel>>
public Task<PlayerModel> Execute(GetRandomPlayerQuery query)
{
private readonly IPlayerRepository _playerRepository;

public GetRandomPlayerQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<PlayerModel> Execute(GetRandomPlayerQuery query)
{
return _playerRepository.GetRandom();
}
return _playerRepository.GetRandom();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class GetRelatedPlayerQuery : IQuery<Task<List<PlayerModel>>>
{
public string UrlName { get; set; }
}

public class GetRelatedPlayerQueryHandler : IQueryHandler<GetRelatedPlayerQuery, Task<List<PlayerModel>>>
{
public class GetRelatedPlayerQuery : IQuery<Task<List<PlayerModel>>>
private readonly IPlayerRepository _playerRepository;

public GetRelatedPlayerQueryHandler(IPlayerRepository playerRepository)
{
public string UrlName { get; set; }
_playerRepository = playerRepository;
}

public class GetRelatedPlayerQueryHandler : IQueryHandler<GetRelatedPlayerQuery, Task<List<PlayerModel>>>
public Task<List<PlayerModel>> Execute(GetRelatedPlayerQuery query)
{
private readonly IPlayerRepository _playerRepository;

public GetRelatedPlayerQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<List<PlayerModel>> Execute(GetRelatedPlayerQuery query)
{
return _playerRepository.GetRelatedPlayers(query.UrlName);
}
return _playerRepository.GetRelatedPlayers(query.UrlName);
}
}
}
31 changes: 15 additions & 16 deletions src/Backend/Geen.Core/Domains/Players/Queries/GetTopPlayersQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class GetTopPlayerQuery : IQuery<Task<List<PlayerModel>>>
{
public string ClubUrlName { get; set; }
}

public class GetTopPlayerQueryHandler : IQueryHandler<GetTopPlayerQuery, Task<List<PlayerModel>>>
{
public class GetTopPlayerQuery : IQuery<Task<List<PlayerModel>>>
private readonly IPlayerRepository _playerRepository;

public GetTopPlayerQueryHandler(IPlayerRepository playerRepository)
{
public string ClubUrlName { get; set; }
_playerRepository = playerRepository;
}

public class GetTopPlayerQueryHandler : IQueryHandler<GetTopPlayerQuery, Task<List<PlayerModel>>>
public Task<List<PlayerModel>> Execute(GetTopPlayerQuery query)
{
private readonly IPlayerRepository _playerRepository;

public GetTopPlayerQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<List<PlayerModel>> Execute(GetTopPlayerQuery query)
{
return _playerRepository.GetTopPlayers(query.ClubUrlName);
}
return _playerRepository.GetTopPlayers(query.ClubUrlName);
}
}
}
31 changes: 15 additions & 16 deletions src/Backend/Geen.Core/Domains/Players/Queries/PlayerGetByIdQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class PlayerGetByIdQuery : IQuery<Task<PlayerModel>>
{
public int Id { get; set; }
}

public class PlayerGetByIdQueryHandler : IQueryHandler<PlayerGetByIdQuery, Task<PlayerModel>>
{
public class PlayerGetByIdQuery : IQuery<Task<PlayerModel>>
private readonly IPlayerRepository _playerRepository;

public PlayerGetByIdQueryHandler(IPlayerRepository playerRepository)
{
public int Id { get; set; }
_playerRepository = playerRepository;
}

public class PlayerGetByIdQueryHandler : IQueryHandler<PlayerGetByIdQuery, Task<PlayerModel>>
public Task<PlayerModel> Execute(PlayerGetByIdQuery query)
{
private readonly IPlayerRepository _playerRepository;

public PlayerGetByIdQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<PlayerModel> Execute(PlayerGetByIdQuery query)
{
return _playerRepository.GetById(query.Id);
}
return _playerRepository.GetById(query.Id);
}
}
}
31 changes: 15 additions & 16 deletions src/Backend/Geen.Core/Domains/Players/Queries/PlayerGetByUrlName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
using Geen.Core.Domains.Players.Repositories;
using Geen.Core.Interfaces.Common;

namespace Geen.Core.Domains.Players.Queries
namespace Geen.Core.Domains.Players.Queries;

public class PlayerGetByUrlName : IQuery<Task<PlayerModel>>
{
public string UrlName { get; set; }
}

public class PlayerGetByUrlNameQueryHandler : IQueryHandler<PlayerGetByUrlName, Task<PlayerModel>>
{
public class PlayerGetByUrlName : IQuery<Task<PlayerModel>>
private readonly IPlayerRepository _playerRepository;

public PlayerGetByUrlNameQueryHandler(IPlayerRepository playerRepository)
{
public string UrlName { get; set; }
_playerRepository = playerRepository;
}

public class PlayerGetByUrlNameQueryHandler : IQueryHandler<PlayerGetByUrlName, Task<PlayerModel>>
public Task<PlayerModel> Execute(PlayerGetByUrlName query)
{
private readonly IPlayerRepository _playerRepository;

public PlayerGetByUrlNameQueryHandler(IPlayerRepository playerRepository)
{
_playerRepository = playerRepository;
}

public Task<PlayerModel> Execute(PlayerGetByUrlName query)
{
return _playerRepository.GetByUrlName(query.UrlName);
}
return _playerRepository.GetByUrlName(query.UrlName);
}
}
}
Loading

0 comments on commit 37ef059

Please sign in to comment.