-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from IliyanIlievPH/12
Closes #12
- Loading branch information
Showing
20 changed files
with
256 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/MAVN.Service.DashboardStatistics.Domain/Enums/ActivityType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace MAVN.Service.DashboardStatistics.Domain.Enums | ||
{ | ||
public enum ActivityType | ||
{ | ||
VoucherBought, | ||
VoucherUsed, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/MAVN.Service.DashboardStatistics.Domain/Repositories/ICustomerActivityRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using System; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace MAVN.Service.DashboardStatistics.Domain.Repositories | ||
{ | ||
public interface ICustomerActivityRepository | ||
{ | ||
Task<int> GetCountAsync(DateTime startDate, DateTime endDate); | ||
Task<int> GetCountAsync(DateTime startDate, DateTime endDate, Guid[] partnerIds); | ||
|
||
Task InsertAsync(Guid customerId, DateTime activityDate); | ||
|
||
Task<int> GetRepeatCountAsync(DateTime startDate, DateTime endDate, Guid[] partnerIds); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...positories/Migrations/20200605084637_ExtendActivityEntityWithPartnerIdAndType.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...s.MsSqlRepositories/Migrations/20200605084637_ExtendActivityEntityWithPartnerIdAndType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
namespace MAVN.Service.DashboardStatistics.MsSqlRepositories.Migrations | ||
{ | ||
public partial class ExtendActivityEntityWithPartnerIdAndType : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AddColumn<int>( | ||
name: "activity_type", | ||
schema: "dashboard_statistic", | ||
table: "customer_activities", | ||
nullable: true); | ||
|
||
migrationBuilder.AddColumn<Guid>( | ||
name: "partner_id", | ||
schema: "dashboard_statistic", | ||
table: "customer_activities", | ||
nullable: true); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "activity_type", | ||
schema: "dashboard_statistic", | ||
table: "customer_activities"); | ||
|
||
migrationBuilder.DropColumn( | ||
name: "partner_id", | ||
schema: "dashboard_statistic", | ||
table: "customer_activities"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.