提交 9dea36c9 编写于 作者: W wq1234wq

移除订阅任务多余的属性

上级 b6a9df2a
...@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; ...@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace IoTSharp.Data.MySql.Migrations namespace IoTSharp.Data.MySql.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
[Migration("20220208151552_addtelantinfo")] [Migration("20220209043947_addtelantinfo")]
partial class addtelantinfo partial class addtelantinfo
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
...@@ -1455,9 +1455,6 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -1455,9 +1455,6 @@ namespace IoTSharp.Data.MySql.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("char(36)"); .HasColumnType("char(36)");
b.Property<Guid>("CustomerId")
.HasColumnType("char(36)");
b.Property<Guid>("EventId") b.Property<Guid>("EventId")
.HasColumnType("char(36)"); .HasColumnType("char(36)");
...@@ -1473,19 +1470,12 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -1473,19 +1470,12 @@ namespace IoTSharp.Data.MySql.Migrations
b.Property<string>("TaskConfig") b.Property<string>("TaskConfig")
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("BindId"); b.HasKey("BindId");
b.HasIndex("CustomerId");
b.HasIndex("RuleTaskExecutorExecutorId"); b.HasIndex("RuleTaskExecutorExecutorId");
b.HasIndex("SubscriptionEventId"); b.HasIndex("SubscriptionEventId");
b.HasIndex("TenantId");
b.ToTable("SubscriptionTasks"); b.ToTable("SubscriptionTasks");
}); });
...@@ -2187,12 +2177,6 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -2187,12 +2177,6 @@ namespace IoTSharp.Data.MySql.Migrations
modelBuilder.Entity("IoTSharp.Data.SubscriptionTask", b => modelBuilder.Entity("IoTSharp.Data.SubscriptionTask", b =>
{ {
b.HasOne("IoTSharp.Data.Customer", "Customer")
.WithMany()
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IoTSharp.Data.RuleTaskExecutor", "RuleTaskExecutor") b.HasOne("IoTSharp.Data.RuleTaskExecutor", "RuleTaskExecutor")
.WithMany() .WithMany()
.HasForeignKey("RuleTaskExecutorExecutorId"); .HasForeignKey("RuleTaskExecutorExecutorId");
...@@ -2201,19 +2185,9 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -2201,19 +2185,9 @@ namespace IoTSharp.Data.MySql.Migrations
.WithMany() .WithMany()
.HasForeignKey("SubscriptionEventId"); .HasForeignKey("SubscriptionEventId");
b.HasOne("IoTSharp.Data.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Customer");
b.Navigation("RuleTaskExecutor"); b.Navigation("RuleTaskExecutor");
b.Navigation("Subscription"); b.Navigation("Subscription");
b.Navigation("Tenant");
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
......
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IoTSharp.Data.MySql.Migrations
{
public partial class addtelantinfo : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
...@@ -1453,9 +1453,6 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -1453,9 +1453,6 @@ namespace IoTSharp.Data.MySql.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("char(36)"); .HasColumnType("char(36)");
b.Property<Guid>("CustomerId")
.HasColumnType("char(36)");
b.Property<Guid>("EventId") b.Property<Guid>("EventId")
.HasColumnType("char(36)"); .HasColumnType("char(36)");
...@@ -1471,19 +1468,12 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -1471,19 +1468,12 @@ namespace IoTSharp.Data.MySql.Migrations
b.Property<string>("TaskConfig") b.Property<string>("TaskConfig")
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("BindId"); b.HasKey("BindId");
b.HasIndex("CustomerId");
b.HasIndex("RuleTaskExecutorExecutorId"); b.HasIndex("RuleTaskExecutorExecutorId");
b.HasIndex("SubscriptionEventId"); b.HasIndex("SubscriptionEventId");
b.HasIndex("TenantId");
b.ToTable("SubscriptionTasks"); b.ToTable("SubscriptionTasks");
}); });
...@@ -2185,12 +2175,6 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -2185,12 +2175,6 @@ namespace IoTSharp.Data.MySql.Migrations
modelBuilder.Entity("IoTSharp.Data.SubscriptionTask", b => modelBuilder.Entity("IoTSharp.Data.SubscriptionTask", b =>
{ {
b.HasOne("IoTSharp.Data.Customer", "Customer")
.WithMany()
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IoTSharp.Data.RuleTaskExecutor", "RuleTaskExecutor") b.HasOne("IoTSharp.Data.RuleTaskExecutor", "RuleTaskExecutor")
.WithMany() .WithMany()
.HasForeignKey("RuleTaskExecutorExecutorId"); .HasForeignKey("RuleTaskExecutorExecutorId");
...@@ -2199,19 +2183,9 @@ namespace IoTSharp.Data.MySql.Migrations ...@@ -2199,19 +2183,9 @@ namespace IoTSharp.Data.MySql.Migrations
.WithMany() .WithMany()
.HasForeignKey("SubscriptionEventId"); .HasForeignKey("SubscriptionEventId");
b.HasOne("IoTSharp.Data.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Customer");
b.Navigation("RuleTaskExecutor"); b.Navigation("RuleTaskExecutor");
b.Navigation("Subscription"); b.Navigation("Subscription");
b.Navigation("Tenant");
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
......
...@@ -24,7 +24,6 @@ namespace IoTSharp.Data ...@@ -24,7 +24,6 @@ namespace IoTSharp.Data
public int EnableTrace { get; set; } //是否开启设备在规则链当中的链路跟踪 public int EnableTrace { get; set; } //是否开启设备在规则链当中的链路跟踪
public Guid DeviceId { get; set; }
public Guid FlowRuleId { get; set; }
} }
} }
...@@ -20,10 +20,6 @@ namespace IoTSharp.Data ...@@ -20,10 +20,6 @@ namespace IoTSharp.Data
public string TaskConfig { get; set; } public string TaskConfig { get; set; }
public Tenant Tenant { get; set; }
public Guid TenantId { get; set; }
public Guid CustomerId { get; set; }
public Customer Customer { get; set; }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册