Skip to content

Commit

Permalink
Closes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
IliyanIlievPH committed Jul 1, 2020
1 parent f29ea21 commit c4c55bd
Show file tree
Hide file tree
Showing 68 changed files with 752 additions and 7,591 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<None Remove="MAVN.Service.Campaign.Client.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.HttpClientGenerator" Version="2.5.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.2.0" />
<PackageReference Include="Lykke.HttpClientGenerator" Version="3.1.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.3.0" />
<PackageReference Include="MAVN.Numerics" Version="1.0.0" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="1.3.0" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="2.14.0" />
<PackageReference Include="Refit" Version="4.6.107" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Lykke.Common" Version="7.5.0" />
<PackageReference Include="MAVN.Numerics" Version="1.0.0" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="1.3.0" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="2.14.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Extensions\" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.1" />
<PackageReference Include="MAVN.Service.BonusTriggerAgent.Contract" Version="1.0.1" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="1.3.0" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.3" />
<PackageReference Include="MAVN.Service.BonusTriggerAgent.Contract" Version="1.1.0" />
<PackageReference Include="MAVN.Service.PartnerManagement.Client" Version="2.14.0" />
<PackageReference Include="MAVN.Service.Scheduler.Contract" Version="1.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/MAVN.Service.Campaign.MsSqlRepositories/AutofacModule.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Autofac;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Campaign.Domain.Repositories;
using MAVN.Service.Campaign.MsSqlRepositories.Repositories;

Expand All @@ -16,7 +16,7 @@ public AutofacModule(string connectionString)

protected override void Load(ContainerBuilder builder)
{
builder.RegisterMsSql(
builder.RegisterPostgreSQL(
_connectionString,
connString => new CampaignContext(connString, false),
dbConn => new CampaignContext(dbConn));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System;
using System.Data.Common;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Campaign.MsSqlRepositories.Entities;
using MAVN.Service.PartnerManagement.Client.Models;
using Microsoft.EntityFrameworkCore;

namespace MAVN.Service.Campaign.MsSqlRepositories
{
public class CampaignContext : MsSqlContext
public class CampaignContext : PostgreSQLContext
{
private const string Schema = "campaign";

Expand Down Expand Up @@ -45,7 +45,7 @@ public CampaignContext(DbConnection dbConnection)
{
}

protected override void OnLykkeModelCreating(ModelBuilder modelBuilder)
protected override void OnMAVNModelCreating(ModelBuilder modelBuilder)
{
//CampaignEntity
modelBuilder.Entity<CampaignEntity>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace MAVN.Service.Campaign.MsSqlRepositories.Entities
public class BonusTypeEntity
{
[Key]
[Column("type", TypeName = "varchar(64)")]
[Column("type")]
public string Type { get; set; }

[Column("display_name")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BurnRuleEntity : BaseEntity
[Column("description")]
public string Description { get; set; }

[Column("amount_in_tokens", TypeName = "nvarchar(64)")]
[Column("amount_in_tokens")]
public Money18? AmountInTokens { get; set; }

[Column("amount_in_currency")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using MAVN.Numerics;
Expand All @@ -16,16 +16,16 @@ public class CampaignEntity : BaseEntity
[Column("description")]
public string Description { get; set; }

[Column("reward", TypeName = "nvarchar(64)")]
[Column("reward")]
public Money18 Reward { get; set; }

[Column("approximate_reward", TypeName = "nvarchar(64)")]
[Column("approximate_reward")]
public Money18? ApproximateAward { get; set; }

[Column("reward_type")]
public RewardType? RewardType { get; set; }

[Column("amount_in_tokens", TypeName = "nvarchar(64)")]
[Column("amount_in_tokens")]
public Money18? AmountInTokens { get; set; }

[Column("amount_in_currency")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using MAVN.Numerics;
Expand All @@ -12,10 +12,10 @@ public class ConditionEntity : BaseEntity
[Column("bonus_type")]
public string BonusTypeName { get; set; }

[Column("immediate_reward", TypeName = "nvarchar(64)")]
[Column("immediate_reward")]
public Money18 ImmediateReward { get; set; }

[Column("approximate_reward", TypeName = "nvarchar(64)")]
[Column("approximate_reward")]
public Money18? ApproximateAward { get; set; }

[Column("completion_count")]
Expand Down Expand Up @@ -44,7 +44,7 @@ public class ConditionEntity : BaseEntity
[Column("burning_rule")]
public decimal? BurningRule { get; set; }

[Column("amount_in_tokens", TypeName = "nvarchar(64)")]
[Column("amount_in_tokens")]
public Money18? AmountInTokens { get; set; }

[Column("amount_in_currency")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="LinqKit.Core" Version="1.1.17" />
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.4" />
<PackageReference Include="Lykke.Logs" Version="7.4.0" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MAVN.Service.Campaign.Domain\MAVN.Service.Campaign.Domain.csproj" />
Expand Down

This file was deleted.

Loading

0 comments on commit c4c55bd

Please sign in to comment.