Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
d5ac97fc
IoTSharp
项目概览
IoTSharp
/
IoTSharp
大约 1 年 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d5ac97fc
编写于
2月 12, 2022
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化租户和客户相关
上级
5f02f9d2
变更
45
展开全部
隐藏空白更改
内联
并排
Showing
45 changed file
with
741 addition
and
12781 deletion
+741
-12781
IoTSharp.Data.MySQL/Migrations/20220211154512_AddTenantInfoAndRefToken.cs
...SQL/Migrations/20220211154512_AddTenantInfoAndRefToken.cs
+0
-19
IoTSharp.Data.MySQL/Migrations/20220212025925_AddTenantInfoAndToken.Designer.cs
...grations/20220212025925_AddTenantInfoAndToken.Designer.cs
+6
-10
IoTSharp.Data.MySQL/Migrations/20220212025925_AddTenantInfoAndToken.cs
....MySQL/Migrations/20220212025925_AddTenantInfoAndToken.cs
+106
-0
IoTSharp.Data.MySQL/Migrations/ApplicationDbContextModelSnapshot.cs
...ata.MySQL/Migrations/ApplicationDbContextModelSnapshot.cs
+4
-8
IoTSharp.Data.PostgreSQL/Migrations/20211029031319_addexecfield.Designer.cs
...greSQL/Migrations/20211029031319_addexecfield.Designer.cs
+0
-1438
IoTSharp.Data.PostgreSQL/Migrations/20211029031319_addexecfield.cs
...Data.PostgreSQL/Migrations/20211029031319_addexecfield.cs
+0
-17
IoTSharp.Data.PostgreSQL/Migrations/20211029031830_renametableeexecutor.Designer.cs
...igrations/20211029031830_renametableeexecutor.Designer.cs
+0
-1438
IoTSharp.Data.PostgreSQL/Migrations/20211029031830_renametableeexecutor.cs
...tgreSQL/Migrations/20211029031830_renametableeexecutor.cs
+0
-17
IoTSharp.Data.PostgreSQL/Migrations/20211103101343_modifyrulemounttype.Designer.cs
...Migrations/20211103101343_modifyrulemounttype.Designer.cs
+0
-1511
IoTSharp.Data.PostgreSQL/Migrations/20211103101343_modifyrulemounttype.cs
...stgreSQL/Migrations/20211103101343_modifyrulemounttype.cs
+0
-17
IoTSharp.Data.PostgreSQL/Migrations/20220211154610_AddTenantInfoAndRefToken.Designer.cs
...tions/20220211154610_AddTenantInfoAndRefToken.Designer.cs
+0
-2340
IoTSharp.Data.PostgreSQL/Migrations/20220211154610_AddTenantInfoAndRefToken.cs
...SQL/Migrations/20220211154610_AddTenantInfoAndRefToken.cs
+0
-813
IoTSharp.Data.PostgreSQL/Migrations/20220212025708_AddTenantInfoAndToken.Designer.cs
...grations/20220212025708_AddTenantInfoAndToken.Designer.cs
+2
-2
IoTSharp.Data.PostgreSQL/Migrations/20220212025708_AddTenantInfoAndToken.cs
...greSQL/Migrations/20220212025708_AddTenantInfoAndToken.cs
+1
-1
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
+4
-0
IoTSharp.Data.SqlServer/Migrations/20210215110232_SQLServerFirstSchema.Designer.cs
...igrations/20210215110232_SQLServerFirstSchema.Designer.cs
+0
-775
IoTSharp.Data.SqlServer/Migrations/20210215110232_SQLServerFirstSchema.cs
...lServer/Migrations/20210215110232_SQLServerFirstSchema.cs
+0
-593
IoTSharp.Data.SqlServer/Migrations/20211003132623_modify_somevalue_can_nullable.Designer.cs
.../20211003132623_modify_somevalue_can_nullable.Designer.cs
+0
-1332
IoTSharp.Data.SqlServer/Migrations/20211003132623_modify_somevalue_can_nullable.cs
...igrations/20211003132623_modify_somevalue_can_nullable.cs
+0
-463
IoTSharp.Data.SqlServer/Migrations/20220212034148_SQLServerSchema2022.Designer.cs
...Migrations/20220212034148_SQLServerSchema2022.Designer.cs
+26
-48
IoTSharp.Data.SqlServer/Migrations/20220212034148_SQLServerSchema2022.cs
...qlServer/Migrations/20220212034148_SQLServerSchema2022.cs
+31
-42
IoTSharp.Data.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
...SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
+24
-46
IoTSharp.Data.Sqlite/Migrations/20220211154534_AddTenantInfoAndRefToken.cs
...ite/Migrations/20220211154534_AddTenantInfoAndRefToken.cs
+0
-1334
IoTSharp.Data.Sqlite/Migrations/20220212030026_AddTenantInfoAndToken.Designer.cs
...grations/20220212030026_AddTenantInfoAndToken.Designer.cs
+6
-10
IoTSharp.Data.Sqlite/Migrations/20220212030026_AddTenantInfoAndToken.cs
...Sqlite/Migrations/20220212030026_AddTenantInfoAndToken.cs
+98
-0
IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs
...ta.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs
+4
-8
IoTSharp.Data/Flow.cs
IoTSharp.Data/Flow.cs
+0
-2
IoTSharp.Data/FlowOperation.cs
IoTSharp.Data/FlowOperation.cs
+0
-3
IoTSharp.Data/FlowRule.cs
IoTSharp.Data/FlowRule.cs
+3
-3
IoTSharp.Data/RuleTaskExecutor.cs
IoTSharp.Data/RuleTaskExecutor.cs
+1
-3
IoTSharp/AppSettings.cs
IoTSharp/AppSettings.cs
+2
-2
IoTSharp/Controllers/AccountController.cs
IoTSharp/Controllers/AccountController.cs
+4
-63
IoTSharp/Controllers/AuthorizedKeysController.cs
IoTSharp/Controllers/AuthorizedKeysController.cs
+4
-6
IoTSharp/Controllers/CustomersController.cs
IoTSharp/Controllers/CustomersController.cs
+1
-1
IoTSharp/Controllers/DevicesController.cs
IoTSharp/Controllers/DevicesController.cs
+1
-1
IoTSharp/Controllers/InstallerController.cs
IoTSharp/Controllers/InstallerController.cs
+1
-1
IoTSharp/Controllers/MenuController.cs
IoTSharp/Controllers/MenuController.cs
+105
-135
IoTSharp/Controllers/RulesController.cs
IoTSharp/Controllers/RulesController.cs
+96
-187
IoTSharp/Controllers/SubscriptionController.cs
IoTSharp/Controllers/SubscriptionController.cs
+5
-5
IoTSharp/Extensions/IoTSharpExtension.cs
IoTSharp/Extensions/IoTSharpExtension.cs
+94
-22
IoTSharp/Extensions/JwtControllerExtension.cs
IoTSharp/Extensions/JwtControllerExtension.cs
+9
-20
IoTSharp/FlowRuleEngine/FlowRuleProcessor.cs
IoTSharp/FlowRuleEngine/FlowRuleProcessor.cs
+7
-38
IoTSharp/IoTSharp.xml
IoTSharp/IoTSharp.xml
+93
-4
IoTSharp/Models/UserProfile.cs
IoTSharp/Models/UserProfile.cs
+1
-1
IoTSharp/appsettings.SQLServer.json
IoTSharp/appsettings.SQLServer.json
+2
-2
未找到文件。
IoTSharp.Data.MySQL/Migrations/20220211154512_AddTenantInfoAndRefToken.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
using
Microsoft.EntityFrameworkCore.Migrations
;
#
nullable
disable
namespace
IoTSharp.Data.MySql.Migrations
{
public
partial
class
AddTenantInfoAndRefToken
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
}
}
}
IoTSharp.Data.MySQL/Migrations/2022021
1154512_AddTenantInfoAndRef
Token.Designer.cs
→
IoTSharp.Data.MySQL/Migrations/2022021
2025925_AddTenantInfoAnd
Token.Designer.cs
浏览文件 @
d5ac97fc
...
...
@@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace
IoTSharp.Data.MySql.Migrations
{
[
DbContext
(
typeof
(
ApplicationDbContext
))]
[
Migration
(
"2022021
1154512_AddTenantInfoAndRef
Token"
)]
partial
class
AddTenantInfoAnd
Ref
Token
[
Migration
(
"2022021
2025925_AddTenantInfoAnd
Token"
)]
partial
class
AddTenantInfoAndToken
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
...
...
@@ -193,7 +193,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -211,7 +211,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
Property
<
string
>(
"MataData"
)
.
HasColumnType
(
"longtext"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -1855,9 +1855,7 @@ namespace IoTSharp.Data.MySql.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
...
...
@@ -1865,9 +1863,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data.MySQL/Migrations/20220212025925_AddTenantInfoAndToken.cs
0 → 100644
浏览文件 @
d5ac97fc
using
System
;
using
Microsoft.EntityFrameworkCore.Migrations
;
#
nullable
disable
namespace
IoTSharp.Data.MySql.Migrations
{
public
partial
class
AddTenantInfoAndToken
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_BaseEvents_Customer_CustomerId"
,
table
:
"BaseEvents"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_BaseEvents_Tenant_TenantId"
,
table
:
"BaseEvents"
);
migrationBuilder
.
AlterColumn
<
Guid
>(
name
:
"TenantId"
,
table
:
"BaseEvents"
,
type
:
"char(36)"
,
nullable
:
true
,
collation
:
"ascii_general_ci"
,
oldClrType
:
typeof
(
Guid
),
oldType
:
"char(36)"
)
.
OldAnnotation
(
"Relational:Collation"
,
"ascii_general_ci"
);
migrationBuilder
.
AlterColumn
<
Guid
>(
name
:
"CustomerId"
,
table
:
"BaseEvents"
,
type
:
"char(36)"
,
nullable
:
true
,
collation
:
"ascii_general_ci"
,
oldClrType
:
typeof
(
Guid
),
oldType
:
"char(36)"
)
.
OldAnnotation
(
"Relational:Collation"
,
"ascii_general_ci"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_BaseEvents_Customer_CustomerId"
,
table
:
"BaseEvents"
,
column
:
"CustomerId"
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_BaseEvents_Tenant_TenantId"
,
table
:
"BaseEvents"
,
column
:
"TenantId"
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropForeignKey
(
name
:
"FK_BaseEvents_Customer_CustomerId"
,
table
:
"BaseEvents"
);
migrationBuilder
.
DropForeignKey
(
name
:
"FK_BaseEvents_Tenant_TenantId"
,
table
:
"BaseEvents"
);
migrationBuilder
.
AlterColumn
<
Guid
>(
name
:
"TenantId"
,
table
:
"BaseEvents"
,
type
:
"char(36)"
,
nullable
:
false
,
defaultValue
:
new
Guid
(
"00000000-0000-0000-0000-000000000000"
),
collation
:
"ascii_general_ci"
,
oldClrType
:
typeof
(
Guid
),
oldType
:
"char(36)"
,
oldNullable
:
true
)
.
OldAnnotation
(
"Relational:Collation"
,
"ascii_general_ci"
);
migrationBuilder
.
AlterColumn
<
Guid
>(
name
:
"CustomerId"
,
table
:
"BaseEvents"
,
type
:
"char(36)"
,
nullable
:
false
,
defaultValue
:
new
Guid
(
"00000000-0000-0000-0000-000000000000"
),
collation
:
"ascii_general_ci"
,
oldClrType
:
typeof
(
Guid
),
oldType
:
"char(36)"
,
oldNullable
:
true
)
.
OldAnnotation
(
"Relational:Collation"
,
"ascii_general_ci"
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_BaseEvents_Customer_CustomerId"
,
table
:
"BaseEvents"
,
column
:
"CustomerId"
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
migrationBuilder
.
AddForeignKey
(
name
:
"FK_BaseEvents_Tenant_TenantId"
,
table
:
"BaseEvents"
,
column
:
"TenantId"
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
}
}
}
IoTSharp.Data.MySQL/Migrations/ApplicationDbContextModelSnapshot.cs
浏览文件 @
d5ac97fc
...
...
@@ -191,7 +191,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -209,7 +209,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
Property
<
string
>(
"MataData"
)
.
HasColumnType
(
"longtext"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"char(36)"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -1853,9 +1853,7 @@ namespace IoTSharp.Data.MySql.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
...
...
@@ -1863,9 +1861,7 @@ namespace IoTSharp.Data.MySql.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data.PostgreSQL/Migrations/20211029031319_addexecfield.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.PostgreSQL/Migrations/20211029031319_addexecfield.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
IoTSharp.Migrations
{
public
partial
class
addexecfield
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
}
}
}
IoTSharp.Data.PostgreSQL/Migrations/20211029031830_renametableeexecutor.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.PostgreSQL/Migrations/20211029031830_renametableeexecutor.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
IoTSharp.Migrations
{
public
partial
class
renametableeexecutor
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
}
}
}
IoTSharp.Data.PostgreSQL/Migrations/20211103101343_modifyrulemounttype.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.PostgreSQL/Migrations/20211103101343_modifyrulemounttype.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
IoTSharp.Migrations
{
public
partial
class
modifyrulemounttype
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
}
}
}
IoTSharp.Data.PostgreSQL/Migrations/20220211154610_AddTenantInfoAndRefToken.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.PostgreSQL/Migrations/20220211154610_AddTenantInfoAndRefToken.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.PostgreSQL/Migrations/2022021202
3819_FixIX_TelemetryData_DeviceId_KeyName_DateTime
.Designer.cs
→
IoTSharp.Data.PostgreSQL/Migrations/2022021202
5708_AddTenantInfoAndToken
.Designer.cs
浏览文件 @
d5ac97fc
...
...
@@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace
IoTSharp.Migrations
{
[
DbContext
(
typeof
(
ApplicationDbContext
))]
[
Migration
(
"2022021202
3819_FixIX_TelemetryData_DeviceId_KeyName_DateTime
"
)]
partial
class
FixIX_TelemetryData_DeviceId_KeyName_DateTime
[
Migration
(
"2022021202
5708_AddTenantInfoAndToken
"
)]
partial
class
AddTenantInfoAndToken
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
...
...
IoTSharp.Data.PostgreSQL/Migrations/2022021202
3819_FixIX_TelemetryData_DeviceId_KeyName_DateTime
.cs
→
IoTSharp.Data.PostgreSQL/Migrations/2022021202
5708_AddTenantInfoAndToken
.cs
浏览文件 @
d5ac97fc
...
...
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace
IoTSharp.Migrations
{
public
partial
class
FixIX_TelemetryData_DeviceId_KeyName_DateTime
:
Migration
public
partial
class
AddTenantInfoAndToken
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
...
...
IoTSharp.Data.SqlServer/IoTSharp.Data.SqlServer.csproj
浏览文件 @
d5ac97fc
...
...
@@ -16,4 +16,8 @@
<ProjectReference Include="..\IoTSharp.Data\IoTSharp.Data.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>
IoTSharp.Data.SqlServer/Migrations/20210215110232_SQLServerFirstSchema.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.SqlServer/Migrations/20210215110232_SQLServerFirstSchema.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.SqlServer/Migrations/20211003132623_modify_somevalue_can_nullable.Designer.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.SqlServer/Migrations/20211003132623_modify_somevalue_can_nullable.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.SqlServer/Migrations/2022021
1155105_AddTenantInfoAndRefToken
.Designer.cs
→
IoTSharp.Data.SqlServer/Migrations/2022021
2034148_SQLServerSchema2022
.Designer.cs
浏览文件 @
d5ac97fc
...
...
@@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace
IoTSharp.Data.SqlServer.Migrations
{
[
DbContext
(
typeof
(
ApplicationDbContext
))]
[
Migration
(
"2022021
1155105_AddTenantInfoAndRefToken
"
)]
partial
class
AddTenantInfoAndRefToken
[
Migration
(
"2022021
2034148_SQLServerSchema2022
"
)]
partial
class
SQLServerSchema2022
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
...
...
@@ -200,7 +200,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -218,7 +218,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"MataData"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -1131,7 +1131,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Createor"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
?>(
"ExecutorId"
)
...
...
@@ -1185,7 +1185,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"TargetId"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
>(
"TestStatus"
)
...
...
@@ -1222,7 +1222,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
DateTime
?>(
"AddDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
Guid
>(
"Base
EventId"
)
b
.
Property
<
Guid
?>(
"BaseEvent
EventId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"BizId"
)
...
...
@@ -1231,10 +1231,10 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"Data"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"FlowId"
)
b
.
Property
<
Guid
?
>(
"FlowId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"Flow
RuleId"
)
b
.
Property
<
Guid
?>(
"FlowRule
RuleId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
?>(
"NodeStatus"
)
...
...
@@ -1254,11 +1254,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
HasKey
(
"OperationId"
);
b
.
HasIndex
(
"BaseEventId"
);
b
.
HasIndex
(
"BaseEvent
Event
Id"
);
b
.
HasIndex
(
"FlowId"
);
b
.
HasIndex
(
"FlowRuleId"
);
b
.
HasIndex
(
"FlowRule
Rule
Id"
);
b
.
ToTable
(
"FlowOperations"
);
});
...
...
@@ -1278,7 +1278,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"Creator"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"DefinitionsXml"
)
...
...
@@ -1315,7 +1315,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
double
>(
"SubVersion"
)
.
HasColumnType
(
"float"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
double
>(
"Version"
)
...
...
@@ -1402,7 +1402,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"DefaultConfig"
)
...
...
@@ -1426,7 +1426,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"Tag"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
>(
"TestStatus"
)
...
...
@@ -1876,9 +1876,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
...
...
@@ -1886,9 +1884,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2098,9 +2094,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.RuleTaskExecutor"
,
"Executor"
)
.
WithMany
()
...
...
@@ -2112,9 +2106,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2129,21 +2121,15 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.BaseEvent"
,
"BaseEvent"
)
.
WithMany
()
.
HasForeignKey
(
"BaseEventId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"BaseEventEventId"
);
b
.
HasOne
(
"IoTSharp.Data.Flow"
,
"Flow"
)
.
WithMany
()
.
HasForeignKey
(
"FlowId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"FlowId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
.
HasForeignKey
(
"FlowRuleId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"FlowRuleRuleId"
);
b
.
Navigation
(
"BaseEvent"
);
...
...
@@ -2156,15 +2142,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2205,15 +2187,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data.SqlServer/Migrations/2022021
1155105_AddTenantInfoAndRefToken
.cs
→
IoTSharp.Data.SqlServer/Migrations/2022021
2034148_SQLServerSchema2022
.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp.Data.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp.Data.Sqlite/Migrations/20220211154534_AddTenantInfoAndRefToken.cs
已删除
100644 → 0
浏览文件 @
5f02f9d2
此差异已折叠。
点击以展开。
IoTSharp.Data.Sqlite/Migrations/2022021
1154534_AddTenantInfoAndRef
Token.Designer.cs
→
IoTSharp.Data.Sqlite/Migrations/2022021
2030026_AddTenantInfoAnd
Token.Designer.cs
浏览文件 @
d5ac97fc
...
...
@@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace
IoTSharp.Data.Sqlite.Migrations
{
[
DbContext
(
typeof
(
ApplicationDbContext
))]
[
Migration
(
"2022021
1154534_AddTenantInfoAndRef
Token"
)]
partial
class
AddTenantInfoAnd
Ref
Token
[
Migration
(
"2022021
2030026_AddTenantInfoAnd
Token"
)]
partial
class
AddTenantInfoAndToken
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
...
...
@@ -191,7 +191,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -209,7 +209,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
Property
<
string
>(
"MataData"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -1853,9 +1853,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
...
...
@@ -1863,9 +1861,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data.Sqlite/Migrations/20220212030026_AddTenantInfoAndToken.cs
0 → 100644
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs
浏览文件 @
d5ac97fc
...
...
@@ -189,7 +189,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -207,7 +207,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
Property
<
string
>(
"MataData"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"TEXT"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -1851,9 +1851,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.FlowRule"
,
"FlowRule"
)
.
WithMany
()
...
...
@@ -1861,9 +1859,7 @@ namespace IoTSharp.Data.Sqlite.Migrations
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data/Flow.cs
浏览文件 @
d5ac97fc
...
...
@@ -39,9 +39,7 @@ namespace IoTSharp.Data
public
Tenant
Tenant
{
get
;
set
;
}
public
Guid
TenantId
{
get
;
set
;
}
public
Guid
CustomerId
{
get
;
set
;
}
public
Customer
Customer
{
get
;
set
;
}
}
...
...
IoTSharp.Data/FlowOperation.cs
浏览文件 @
d5ac97fc
...
...
@@ -23,11 +23,8 @@ namespace IoTSharp.Data
public
string
BizId
{
get
;
set
;
}
public
string
bpmnid
{
get
;
set
;
}
public
Flow
Flow
{
get
;
set
;
}
public
Guid
FlowId
{
get
;
set
;
}
public
FlowRule
FlowRule
{
get
;
set
;
}
public
Guid
FlowRuleId
{
get
;
set
;
}
public
BaseEvent
BaseEvent
{
get
;
set
;
}
public
Guid
BaseEventId
{
get
;
set
;
}
public
int
Step
{
get
;
set
;
}
public
string
Tag
{
get
;
set
;
}
}
...
...
IoTSharp.Data/FlowRule.cs
浏览文件 @
d5ac97fc
...
...
@@ -12,7 +12,9 @@ namespace IoTSharp.Data
{
[
Key
]
public
Guid
RuleId
{
get
;
set
;
}
public
RuleType
RuleType
{
get
;
set
;
}
[
Required
]
public
string
Name
{
get
;
set
;
}
[
Required
]
public
string
Name
{
get
;
set
;
}
public
string
Describes
{
get
;
set
;
}
public
string
Runner
{
get
;
set
;
}
public
string
ExecutableCode
{
get
;
set
;
}
...
...
@@ -28,9 +30,7 @@ namespace IoTSharp.Data
public
Guid
CreateId
{
get
;
set
;
}
public
MountType
MountType
{
get
;
set
;
}
public
Tenant
Tenant
{
get
;
set
;
}
public
Guid
TenantId
{
get
;
set
;
}
public
Guid
CustomerId
{
get
;
set
;
}
public
Customer
Customer
{
get
;
set
;
}
}
...
...
IoTSharp.Data/RuleTaskExecutor.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/AppSettings.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/AccountController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/AuthorizedKeysController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/CustomersController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/DevicesController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/InstallerController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/MenuController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/RulesController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Controllers/SubscriptionController.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Extensions/IoTSharpExtension.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Extensions/JwtControllerExtension.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/FlowRuleEngine/FlowRuleProcessor.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/IoTSharp.xml
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/Models/UserProfile.cs
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
IoTSharp/appsettings.SQLServer.json
浏览文件 @
d5ac97fc
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录