add new migration
This commit is contained in:
parent
6ff6864f91
commit
0586fe5abd
@ -8,7 +8,7 @@ using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure;
|
||||
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations
|
||||
{
|
||||
[DbContext(typeof(MarketingContext))]
|
||||
[Migration("20170602122539_Initial")]
|
||||
[Migration("20170609104915_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@ -101,7 +101,7 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Mark
|
||||
|
||||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign")
|
||||
b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign")
|
||||
.WithMany("Rules")
|
||||
.HasForeignKey("CampaignId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
@ -100,7 +100,7 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Mark
|
||||
|
||||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign")
|
||||
b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign")
|
||||
.WithMany("Rules")
|
||||
.HasForeignKey("CampaignId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
@ -9,25 +9,19 @@
|
||||
public Campaign Campaign { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public abstract int RuleTypeId { get;}
|
||||
}
|
||||
|
||||
|
||||
public class UserProfileRule : Rule
|
||||
{
|
||||
public override int RuleTypeId => (int)RuleTypeEnum.UserProfileRule;
|
||||
}
|
||||
|
||||
public class PurchaseHistoryRule : Rule
|
||||
{
|
||||
public override int RuleTypeId => (int)RuleTypeEnum.PurchaseHistoryRule;
|
||||
}
|
||||
|
||||
public class UserLocationRule : Rule
|
||||
{
|
||||
public override int RuleTypeId => (int)RuleTypeEnum.UserLocationRule;
|
||||
|
||||
public int LocationId { get; set; }
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user