Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
4e0ba66a
IoTSharp
项目概览
IoTSharp
/
IoTSharp
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
4e0ba66a
编写于
12月 28, 2018
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify keyvalue
上级
0ac83e7c
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
488 addition
and
46 deletion
+488
-46
IoTSharp.Hub/Data/ApplicationDbContext.cs
IoTSharp.Hub/Data/ApplicationDbContext.cs
+35
-15
IoTSharp.Hub/Data/Devices.cs
IoTSharp.Hub/Data/Devices.cs
+5
-0
IoTSharp.Hub/Data/Enums.cs
IoTSharp.Hub/Data/Enums.cs
+9
-1
IoTSharp.Hub/Data/KevValueTelemetry.cs
IoTSharp.Hub/Data/KevValueTelemetry.cs
+16
-0
IoTSharp.Hub/Data/KeyValue.cs
IoTSharp.Hub/Data/KeyValue.cs
+21
-0
IoTSharp.Hub/Data/KeyValueClientSide.cs
IoTSharp.Hub/Data/KeyValueClientSide.cs
+12
-0
IoTSharp.Hub/Data/KeyValueDeviceLatest.cs
IoTSharp.Hub/Data/KeyValueDeviceLatest.cs
+15
-0
IoTSharp.Hub/Data/KeyValueServerSide.cs
IoTSharp.Hub/Data/KeyValueServerSide.cs
+12
-0
IoTSharp.Hub/Data/KeyValueSharedSide.cs
IoTSharp.Hub/Data/KeyValueSharedSide.cs
+14
-0
IoTSharp.Hub/Data/Relationship.cs
IoTSharp.Hub/Data/Relationship.cs
+6
-4
IoTSharp.Hub/Data/SharedSideAttribute.cs
IoTSharp.Hub/Data/SharedSideAttribute.cs
+0
-26
IoTSharp.Hub/Data/Tenant.cs
IoTSharp.Hub/Data/Tenant.cs
+2
-0
IoTSharp.Hub/IoTSharp.Hub.csproj
IoTSharp.Hub/IoTSharp.Hub.csproj
+1
-0
doc/IoTSharp.dbs
doc/IoTSharp.dbs
+340
-0
未找到文件。
IoTSharp.Hub/Data/ApplicationDbContext.cs
浏览文件 @
4e0ba66a
...
...
@@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore;
using
Microsoft.Extensions.Configuration
;
using
System
;
using
System.Linq
;
namespace
IoTSharp.Hub.Data
{
public
class
ApplicationDbContext
:
IdentityDbContext
...
...
@@ -35,14 +34,33 @@ namespace IoTSharp.Hub.Data
.
HasOne
(
p
=>
p
.
Tenant
)
.
WithMany
(
b
=>
b
.
Customers
);
modelBuilder
.
Entity
<
Device
>()
modelBuilder
.
Entity
<
Device
>()
.
HasOne
(
p
=>
p
.
Customer
)
.
WithMany
(
b
=>
b
.
Devices
);
modelBuilder
.
Entity
<
Device
>()
modelBuilder
.
Entity
<
KeyValueSharedSide
>()
.
HasOne
(
p
=>
p
.
Device
)
.
WithMany
(
b
=>
b
.
SharedSideKeyValue
);
modelBuilder
.
Entity
<
KeyValueServerSide
>()
.
HasOne
(
p
=>
p
.
Device
)
.
WithMany
(
b
=>
b
.
ServerSideKeyValue
);
modelBuilder
.
Entity
<
KeyValueClientSide
>()
.
HasOne
(
p
=>
p
.
Device
)
.
WithMany
(
b
=>
b
.
ClientSideKeyValue
);
modelBuilder
.
Entity
<
Device
>()
.
HasOne
(
p
=>
p
.
Tenant
)
.
WithMany
(
b
=>
b
.
Devices
);
modelBuilder
.
Entity
<
Relationship
>()
.
HasOne
(
p
=>
p
.
Tenant
);
modelBuilder
.
Entity
<
Relationship
>()
.
HasOne
(
p
=>
p
.
Customer
);
modelBuilder
.
Entity
<
Relationship
>()
.
HasOne
(
p
=>
p
.
Identity
);
switch
(
DatabaseType
)
{
case
DatabaseType
.
mssql
:
...
...
@@ -60,39 +78,39 @@ namespace IoTSharp.Hub.Data
private
void
ForNpgsql
(
ModelBuilder
modelBuilder
)
{
modelBuilder
.
Entity
<
ClientSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueClientSid
e
>()
.
Property
(
b
=>
b
.
Value_Json
)
.
HasColumnType
(
"jsonb"
);
modelBuilder
.
Entity
<
ClientSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueClientSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
modelBuilder
.
Entity
<
ServerSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueServerSid
e
>()
.
Property
(
b
=>
b
.
Value_Json
)
.
HasColumnType
(
"jsonb"
);
modelBuilder
.
Entity
<
ServerSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueServerSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
modelBuilder
.
Entity
<
SharedSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueSharedSid
e
>()
.
Property
(
b
=>
b
.
Value_Json
)
.
HasColumnType
(
"jsonb"
);
modelBuilder
.
Entity
<
SharedSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueSharedSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
}
private
void
ForSqlServer
(
ModelBuilder
modelBuilder
)
{
modelBuilder
.
Entity
<
ClientSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueClientSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
modelBuilder
.
Entity
<
ServerSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueServerSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
modelBuilder
.
Entity
<
SharedSideAttribut
e
>()
modelBuilder
.
Entity
<
KeyValueSharedSid
e
>()
.
Property
(
b
=>
b
.
Value_XML
)
.
HasColumnType
(
"xml"
);
}
...
...
@@ -101,9 +119,11 @@ namespace IoTSharp.Hub.Data
public
DbSet
<
Relationship
>
Relationship
{
get
;
set
;
}
public
DbSet
<
Device
>
Device
{
get
;
set
;
}
public
DbSet
<
ClientSideAttribute
>
ClientSideAttribute
{
get
;
set
;
}
public
DbSet
<
ServerSideAttribute
>
ServerSideAttribute
{
get
;
set
;
}
public
DbSet
<
SharedSideAttribute
>
SharedSideAttribute
{
get
;
set
;
}
public
DbSet
<
KeyValueClientSide
>
ClientSide
{
get
;
set
;
}
public
DbSet
<
KeyValueServerSide
>
ServerSide
{
get
;
set
;
}
public
DbSet
<
KeyValueSharedSide
>
SharedSide
{
get
;
set
;
}
public
DbSet
<
KevValueTelemetry
>
TelemetryData
{
get
;
set
;
}
public
DbSet
<
KeyValueDeviceLatest
>
DeviceLatest
{
get
;
set
;
}
}
...
...
IoTSharp.Hub/Data/Devices.cs
浏览文件 @
4e0ba66a
...
...
@@ -16,6 +16,11 @@ namespace IoTSharp.Hub.Data
public
Tenant
Tenant
{
get
;
set
;
}
public
Customer
Customer
{
get
;
set
;
}
public
List
<
KeyValueServerSide
>
ServerSideKeyValue
{
get
;
set
;
}
public
List
<
KeyValueSharedSide
>
SharedSideKeyValue
{
get
;
set
;
}
public
List
<
KeyValueClientSide
>
ClientSideKeyValue
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/Enums.cs
浏览文件 @
4e0ba66a
...
...
@@ -5,7 +5,15 @@ using System.Threading.Tasks;
namespace
IoTSharp.Hub.Data
{
public
enum
AttributeType
public
enum
KeyValueScope
{
ShareSide
,
ServerSide
,
ClientSide
}
public
enum
DataType
{
Boolean
,
String
,
...
...
IoTSharp.Hub/Data/
ServerSideAttribute
.cs
→
IoTSharp.Hub/Data/
KevValueTelemetry
.cs
浏览文件 @
4e0ba66a
...
...
@@ -8,19 +8,9 @@ using System.Threading.Tasks;
namespace
IoTSharp.Hub.Data
{
public
class
ServerSideAttribut
e
public
class
KevValueTelemetry
:
KeyValu
e
{
[
Key
]
public
Guid
Id
{
get
;
set
;
}
=
Guid
.
NewGuid
();
public
string
Name
{
get
;
set
;
}
[
EnumDataType
(
typeof
(
AttributeType
))]
public
AttributeType
Type
{
get
;
set
;
}
public
bool
Value_Boolean
{
get
;
set
;
}
public
string
Value_String
{
get
;
set
;
}
public
long
Value_Long
{
get
;
set
;
}
public
double
Value_Double
{
get
;
set
;
}
public
string
Value_Json
{
get
;
set
;
}
public
string
Value_XML
{
get
;
set
;
}
public
byte
[]
Value_Binary
{
get
;
set
;
}
public
Device
Device
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/
ClientSideAttribut
e.cs
→
IoTSharp.Hub/Data/
KeyValu
e.cs
浏览文件 @
4e0ba66a
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.ComponentModel.DataAnnotations
;
namespace
IoTSharp.Hub.Data
{
public
class
ClientSideAttribute
public
class
KeyValue
{
[
Key
]
public
Guid
Id
{
get
;
set
;
}
=
Guid
.
NewGuid
();
public
string
Name
{
get
;
set
;
}
[
EnumDataType
(
typeof
(
AttributeType
))]
public
AttributeType
Type
{
get
;
set
;
}
public
string
KeyName
{
get
;
set
;
}
[
Key
]
[
EnumDataType
(
typeof
(
DataType
))]
public
DataType
Type
{
get
;
set
;
}
public
bool
Value_Boolean
{
get
;
set
;
}
public
string
Value_String
{
get
;
set
;
}
public
long
Value_Long
{
get
;
set
;
}
...
...
IoTSharp.Hub/Data/KeyValueClientSide.cs
0 → 100644
浏览文件 @
4e0ba66a
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
IoTSharp.Hub.Data
{
public
class
KeyValueClientSide
:
KeyValueSharedSide
{
}
}
IoTSharp.Hub/Data/KeyValueDeviceLatest.cs
0 → 100644
浏览文件 @
4e0ba66a
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
IoTSharp.Hub.Data
{
public
class
KeyValueDeviceLatest
:
KeyValueSharedSide
{
[
Key
]
[
EnumDataType
(
typeof
(
KeyValueScope
))]
public
KeyValueScope
Scope
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/KeyValueServerSide.cs
0 → 100644
浏览文件 @
4e0ba66a
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
IoTSharp.Hub.Data
{
public
class
KeyValueServerSide
:
KeyValueSharedSide
{
}
}
IoTSharp.Hub/Data/KeyValueSharedSide.cs
0 → 100644
浏览文件 @
4e0ba66a
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
IoTSharp.Hub.Data
{
public
class
KeyValueSharedSide
:
KeyValue
{
[
Key
]
public
Device
Device
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/Relationship.cs
浏览文件 @
4e0ba66a
using
System
;
using
Microsoft.AspNetCore.Identity
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.Linq
;
...
...
@@ -9,9 +10,10 @@ namespace IoTSharp.Hub.Data
public
class
Relationship
{
[
Key
]
public
Guid
UseId
{
get
;
set
;
}
public
Guid
CustomerId
{
get
;
set
;
}
public
Guid
Id
{
get
;
set
;
}
public
IdentityUser
Identity
{
get
;
set
;
}
public
Tenant
Tenant
{
get
;
set
;
}
public
Guid
TenantId
{
get
;
set
;
}
public
Customer
Customer
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/SharedSideAttribute.cs
已删除
100644 → 0
浏览文件 @
0ac83e7c
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
IoTSharp.Hub.Data
{
public
class
SharedSideAttribute
{
[
Key
]
public
Guid
Id
{
get
;
set
;
}
=
Guid
.
NewGuid
();
public
string
Name
{
get
;
set
;
}
[
EnumDataType
(
typeof
(
AttributeType
))]
public
AttributeType
Type
{
get
;
set
;
}
public
bool
Value_Boolean
{
get
;
set
;
}
public
string
Value_String
{
get
;
set
;
}
public
long
Value_Long
{
get
;
set
;
}
public
double
Value_Double
{
get
;
set
;
}
public
string
Value_Json
{
get
;
set
;
}
public
string
Value_XML
{
get
;
set
;
}
public
byte
[]
Value_Binary
{
get
;
set
;
}
}
}
IoTSharp.Hub/Data/Tenant.cs
浏览文件 @
4e0ba66a
...
...
@@ -21,5 +21,7 @@ namespace IoTSharp.Hub.Data
public
int
ZipCode
{
get
;
set
;
}
public
List
<
Customer
>
Customers
{
get
;
set
;
}
public
List
<
Device
>
Devices
{
get
;
set
;
}
}
}
IoTSharp.Hub/IoTSharp.Hub.csproj
浏览文件 @
4e0ba66a
...
...
@@ -33,6 +33,7 @@
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6" />
<PackageReference Include="MQTTnet" Version="2.8.5" />
...
...
doc/IoTSharp.dbs
0 → 100644
浏览文件 @
4e0ba66a
<?xml version="1.0" encoding="UTF-8" ?>
<project
name=
"PostgreSQL"
id=
"Project_ee5c59"
template=
"Default"
database=
"PostgreSQL"
>
<schema
name=
"public"
catalogname=
"IoTSharp"
schemaname=
"public"
>
<table
name=
"AspNetRoleClaims"
>
<column
name=
"Id"
type=
"serial"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
autoincrement=
"y"
/>
<column
name=
"RoleId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"ClaimType"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ClaimValue"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<index
name=
"PK_AspNetRoleClaims"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"IX_AspNetRoleClaims_RoleId"
unique=
"NORMAL"
>
<column
name=
"RoleId"
/>
</index>
<fk
name=
"FK_AspNetRoleClaims_AspNetRoles_RoleId"
to_schema=
"public"
to_table=
"AspNetRoles"
delete_action=
"cascade"
>
<fk_column
name=
"RoleId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"AspNetRoles"
>
<column
name=
"Id"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"NormalizedName"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ConcurrencyStamp"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<index
name=
"PK_AspNetRoles"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"RoleNameIndex"
unique=
"UNIQUE"
>
<column
name=
"NormalizedName"
/>
</index>
</table>
<table
name=
"AspNetUserClaims"
>
<column
name=
"Id"
type=
"serial"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
autoincrement=
"y"
/>
<column
name=
"UserId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"ClaimType"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ClaimValue"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<index
name=
"PK_AspNetUserClaims"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"IX_AspNetUserClaims_UserId"
unique=
"NORMAL"
>
<column
name=
"UserId"
/>
</index>
<fk
name=
"FK_AspNetUserClaims_AspNetUsers_UserId"
to_schema=
"public"
to_table=
"AspNetUsers"
delete_action=
"cascade"
>
<fk_column
name=
"UserId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"AspNetUserLogins"
>
<column
name=
"LoginProvider"
type=
"varchar"
length=
"128"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"ProviderKey"
type=
"varchar"
length=
"128"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"ProviderDisplayName"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"UserId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<index
name=
"PK_AspNetUserLogins"
unique=
"PRIMARY_KEY"
>
<column
name=
"LoginProvider"
/>
<column
name=
"ProviderKey"
/>
</index>
<index
name=
"IX_AspNetUserLogins_UserId"
unique=
"NORMAL"
>
<column
name=
"UserId"
/>
</index>
<fk
name=
"FK_AspNetUserLogins_AspNetUsers_UserId"
to_schema=
"public"
to_table=
"AspNetUsers"
delete_action=
"cascade"
>
<fk_column
name=
"UserId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"AspNetUserRoles"
>
<column
name=
"UserId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"RoleId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<index
name=
"PK_AspNetUserRoles"
unique=
"PRIMARY_KEY"
>
<column
name=
"UserId"
/>
<column
name=
"RoleId"
/>
</index>
<index
name=
"IX_AspNetUserRoles_RoleId"
unique=
"NORMAL"
>
<column
name=
"RoleId"
/>
</index>
<fk
name=
"FK_AspNetUserRoles_AspNetRoles_RoleId"
to_schema=
"public"
to_table=
"AspNetRoles"
delete_action=
"cascade"
>
<fk_column
name=
"RoleId"
pk=
"Id"
/>
</fk>
<fk
name=
"FK_AspNetUserRoles_AspNetUsers_UserId"
to_schema=
"public"
to_table=
"AspNetUsers"
delete_action=
"cascade"
>
<fk_column
name=
"UserId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"AspNetUserTokens"
>
<column
name=
"UserId"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"LoginProvider"
type=
"varchar"
length=
"128"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"varchar"
length=
"128"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"Value"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<index
name=
"PK_AspNetUserTokens"
unique=
"PRIMARY_KEY"
>
<column
name=
"UserId"
/>
<column
name=
"LoginProvider"
/>
<column
name=
"Name"
/>
</index>
<fk
name=
"FK_AspNetUserTokens_AspNetUsers_UserId"
to_schema=
"public"
to_table=
"AspNetUsers"
delete_action=
"cascade"
>
<fk_column
name=
"UserId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"AspNetUsers"
>
<column
name=
"Id"
type=
"text"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"UserName"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"NormalizedUserName"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Email"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"NormalizedEmail"
type=
"varchar"
length=
"256"
decimal=
"0"
jt=
"12"
/>
<column
name=
"EmailConfirmed"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"PasswordHash"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"SecurityStamp"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ConcurrencyStamp"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"PhoneNumber"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"PhoneNumberConfirmed"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"TwoFactorEnabled"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"LockoutEnd"
type=
"timestamptz"
length=
"35"
decimal=
"6"
jt=
"93"
/>
<column
name=
"LockoutEnabled"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"AccessFailedCount"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<index
name=
"PK_AspNetUsers"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"UserNameIndex"
unique=
"UNIQUE"
>
<column
name=
"NormalizedUserName"
/>
</index>
<index
name=
"EmailIndex"
unique=
"NORMAL"
>
<column
name=
"NormalizedEmail"
/>
</index>
</table>
<table
name=
"ClientSideAttribute"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Type"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<column
name=
"Value_Boolean"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"Value_String"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Value_Long"
type=
"bigint"
length=
"19"
decimal=
"0"
jt=
"-5"
mandatory=
"y"
/>
<column
name=
"Value_Double"
type=
"float8"
length=
"17"
decimal=
"17"
jt=
"6"
mandatory=
"y"
/>
<column
name=
"Value_Json"
type=
"jsonb"
decimal=
"0"
jt=
"1111"
/>
<column
name=
"Value_XML"
type=
"xml"
decimal=
"0"
jt=
"2009"
/>
<column
name=
"Value_Binary"
type=
"bytea"
decimal=
"0"
jt=
"-2"
/>
<index
name=
"PK_ClientSideAttribute"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
</table>
<table
name=
"Customer"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Email"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Phone"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Country"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Province"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"City"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Street"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Address"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ZipCode"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<column
name=
"TenantId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
/>
<index
name=
"PK_Customer"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"IX_Customer_TenantId"
unique=
"NORMAL"
>
<column
name=
"TenantId"
/>
</index>
<fk
name=
"FK_Customer_Tenant_TenantId"
to_schema=
"public"
to_table=
"Tenant"
delete_action=
"restrict"
>
<fk_column
name=
"TenantId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"Device"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Type"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"TenantId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
/>
<column
name=
"CustomerId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
/>
<index
name=
"PK_Device"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
<index
name=
"IX_Device_CustomerId"
unique=
"NORMAL"
>
<column
name=
"CustomerId"
/>
</index>
<index
name=
"IX_Device_TenantId"
unique=
"NORMAL"
>
<column
name=
"TenantId"
/>
</index>
<fk
name=
"FK_Device_Customer_CustomerId"
to_schema=
"public"
to_table=
"Customer"
delete_action=
"restrict"
>
<fk_column
name=
"CustomerId"
pk=
"Id"
/>
</fk>
<fk
name=
"FK_Device_Tenant_TenantId"
to_schema=
"public"
to_table=
"Tenant"
delete_action=
"restrict"
>
<fk_column
name=
"TenantId"
pk=
"Id"
/>
</fk>
</table>
<table
name=
"Relationship"
>
<column
name=
"UseId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"CustomerId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"TenantId"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<index
name=
"PK_Relationship"
unique=
"PRIMARY_KEY"
>
<column
name=
"UseId"
/>
</index>
</table>
<table
name=
"ServerSideAttribute"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Type"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<column
name=
"Value_Boolean"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"Value_String"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Value_Long"
type=
"bigint"
length=
"19"
decimal=
"0"
jt=
"-5"
mandatory=
"y"
/>
<column
name=
"Value_Double"
type=
"float8"
length=
"17"
decimal=
"17"
jt=
"6"
mandatory=
"y"
/>
<column
name=
"Value_Json"
type=
"jsonb"
decimal=
"0"
jt=
"1111"
/>
<column
name=
"Value_XML"
type=
"xml"
decimal=
"0"
jt=
"2009"
/>
<column
name=
"Value_Binary"
type=
"bytea"
decimal=
"0"
jt=
"-2"
/>
<index
name=
"PK_ServerSideAttribute"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
</table>
<table
name=
"SharedSideAttribute"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Type"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<column
name=
"Value_Boolean"
type=
"bool"
length=
"1"
decimal=
"0"
jt=
"-7"
mandatory=
"y"
/>
<column
name=
"Value_String"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Value_Long"
type=
"bigint"
length=
"19"
decimal=
"0"
jt=
"-5"
mandatory=
"y"
/>
<column
name=
"Value_Double"
type=
"float8"
length=
"17"
decimal=
"17"
jt=
"6"
mandatory=
"y"
/>
<column
name=
"Value_Json"
type=
"jsonb"
decimal=
"0"
jt=
"1111"
/>
<column
name=
"Value_XML"
type=
"xml"
decimal=
"0"
jt=
"2009"
/>
<column
name=
"Value_Binary"
type=
"bytea"
decimal=
"0"
jt=
"-2"
/>
<index
name=
"PK_SharedSideAttribute"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
</table>
<table
name=
"Tenant"
>
<column
name=
"Id"
type=
"uuid"
decimal=
"0"
jt=
"1111"
mandatory=
"y"
/>
<column
name=
"Name"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"EMail"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Phone"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Country"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Province"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"City"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Street"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"Address"
type=
"text"
decimal=
"0"
jt=
"12"
/>
<column
name=
"ZipCode"
type=
"integer"
length=
"10"
decimal=
"0"
jt=
"4"
mandatory=
"y"
/>
<index
name=
"PK_Tenant"
unique=
"PRIMARY_KEY"
>
<column
name=
"Id"
/>
</index>
</table>
<table
name=
"__EFMigrationsHistory"
>
<column
name=
"MigrationId"
type=
"varchar"
length=
"150"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<column
name=
"ProductVersion"
type=
"varchar"
length=
"32"
decimal=
"0"
jt=
"12"
mandatory=
"y"
/>
<index
name=
"PK___EFMigrationsHistory"
unique=
"PRIMARY_KEY"
>
<column
name=
"MigrationId"
/>
</index>
</table>
<sequence
name=
"AspNetRoleClaims_Id_seq"
start=
"1"
/>
<sequence
name=
"AspNetUserClaims_Id_seq"
start=
"1"
/>
</schema>
<connector
name=
"PostgreSQL"
database=
"PostgreSQL"
driver_class=
"org.postgresql.Driver"
driver_jar=
"postgresql-42.2.2.jar"
driver_desc=
"Standard"
host=
"localhost"
port=
"5432"
instance=
"IoTSharp"
user=
"postgres"
passwd=
"ZnV0dXJl"
/>
<layout
name=
"Default Layout"
id=
"Layout_159a766"
show_relation=
"columns"
>
<entity
schema=
"public"
name=
"AspNetRoleClaims"
color=
"BED3F4"
x=
"672"
y=
"48"
/>
<entity
schema=
"public"
name=
"AspNetRoles"
color=
"BED3F4"
x=
"464"
y=
"48"
/>
<entity
schema=
"public"
name=
"AspNetUserClaims"
color=
"BED3F4"
x=
"288"
y=
"224"
/>
<entity
schema=
"public"
name=
"AspNetUserLogins"
color=
"BED3F4"
x=
"288"
y=
"400"
/>
<entity
schema=
"public"
name=
"AspNetUserRoles"
color=
"BED3F4"
x=
"288"
y=
"48"
/>
<entity
schema=
"public"
name=
"AspNetUserTokens"
color=
"BED3F4"
x=
"48"
y=
"400"
/>
<entity
schema=
"public"
name=
"AspNetUsers"
color=
"BED3F4"
x=
"48"
y=
"48"
/>
<entity
schema=
"public"
name=
"ClientSideAttribute"
color=
"F4DDBE"
x=
"432"
y=
"752"
/>
<entity
schema=
"public"
name=
"Customer"
color=
"C7F4BE"
x=
"880"
y=
"48"
/>
<entity
schema=
"public"
name=
"Device"
color=
"C7F4BE"
x=
"1024"
y=
"48"
/>
<entity
schema=
"public"
name=
"Relationship"
color=
"F4DDBE"
x=
"240"
y=
"896"
/>
<entity
schema=
"public"
name=
"ServerSideAttribute"
color=
"F4DDBE"
x=
"64"
y=
"896"
/>
<entity
schema=
"public"
name=
"SharedSideAttribute"
color=
"F4DDBE"
x=
"48"
y=
"624"
/>
<entity
schema=
"public"
name=
"Tenant"
color=
"C7F4BE"
x=
"1024"
y=
"336"
/>
<entity
schema=
"public"
name=
"__EFMigrationsHistory"
color=
"F4DDBE"
x=
"240"
y=
"752"
/>
</layout>
<layout
name=
"Sample Layout with Tools"
id=
"Layout_54786c0"
show_column_type=
"y"
show_relation=
"columns"
>
<entity
schema=
"public"
name=
"AspNetRoleClaims"
color=
"BED3F4"
x=
"768"
y=
"176"
/>
<entity
schema=
"public"
name=
"AspNetRoles"
color=
"BED3F4"
x=
"512"
y=
"176"
/>
<entity
schema=
"public"
name=
"AspNetUserClaims"
color=
"BED3F4"
x=
"336"
y=
"352"
/>
<entity
schema=
"public"
name=
"AspNetUserLogins"
color=
"BED3F4"
x=
"336"
y=
"528"
/>
<entity
schema=
"public"
name=
"AspNetUserRoles"
color=
"BED3F4"
x=
"336"
y=
"176"
/>
<entity
schema=
"public"
name=
"AspNetUserTokens"
color=
"BED3F4"
x=
"48"
y=
"528"
/>
<entity
schema=
"public"
name=
"AspNetUsers"
color=
"BED3F4"
x=
"48"
y=
"176"
/>
<entity
schema=
"public"
name=
"ClientSideAttribute"
color=
"F4DDBE"
x=
"496"
y=
"880"
/>
<entity
schema=
"public"
name=
"Customer"
color=
"C7F4BE"
x=
"976"
y=
"176"
/>
<entity
schema=
"public"
name=
"Device"
color=
"C7F4BE"
x=
"1152"
y=
"176"
/>
<entity
schema=
"public"
name=
"Relationship"
color=
"F4DDBE"
x=
"256"
y=
"1024"
/>
<entity
schema=
"public"
name=
"ServerSideAttribute"
color=
"F4DDBE"
x=
"48"
y=
"1024"
/>
<entity
schema=
"public"
name=
"SharedSideAttribute"
color=
"F4DDBE"
x=
"48"
y=
"752"
/>
<entity
schema=
"public"
name=
"Tenant"
color=
"C7F4BE"
x=
"1152"
y=
"464"
/>
<entity
schema=
"public"
name=
"__EFMigrationsHistory"
color=
"F4DDBE"
x=
"256"
y=
"880"
/>
<callout
x=
"48"
y=
"80"
pointer=
"NO"
>
<comment>
<![CDATA[This is a sample layout with tools.
You can create multiple layouts with the same or different tables.
Layouts are saved together with the schema to project file and can be later reopen.
Inside layouts double-click any table, column or foreign key to edit.
On the bottom there are three tools:
Relational Data Browse for exploring data from multiple tables and two query editors.]]>
</comment>
</callout>
<group
name=
"AspNetUsers"
color=
"ECF0F7"
>
<entity
schema=
"public"
name=
"AspNetUsers"
/>
<entity
schema=
"public"
name=
"AspNetUserRoles"
/>
<entity
schema=
"public"
name=
"AspNetRoles"
/>
<entity
schema=
"public"
name=
"AspNetUserClaims"
/>
<entity
schema=
"public"
name=
"AspNetRoleClaims"
/>
<entity
schema=
"public"
name=
"AspNetUserLogins"
/>
<entity
schema=
"public"
name=
"AspNetUserTokens"
/>
</group>
<group
name=
"Customer"
color=
"EEF7EC"
>
<entity
schema=
"public"
name=
"Customer"
/>
<entity
schema=
"public"
name=
"Device"
/>
<entity
schema=
"public"
name=
"Tenant"
/>
</group>
<group
name=
"__EFMigrationsHistory"
color=
"F7F2EC"
>
<entity
schema=
"public"
name=
"__EFMigrationsHistory"
/>
<entity
schema=
"public"
name=
"ClientSideAttribute"
/>
<entity
schema=
"public"
name=
"Relationship"
/>
<entity
schema=
"public"
name=
"ServerSideAttribute"
/>
<entity
schema=
"public"
name=
"SharedSideAttribute"
/>
</group>
<script
name=
"Sample SQL Editor"
id=
"Editor_40b3990"
language=
"SQL"
>
<string>
<![CDATA[SELECT *
FROM
"public"."AspNetUsers" s;]]>
</string>
</script>
<browser
id=
"Browse_3dfec5d"
name=
"Sample Relational Data Browse"
confirm_updates=
"y"
>
<browse_table
schema=
"public"
entity=
"AspNetUsers"
x=
"20"
y=
"20"
width=
"400"
height=
"300"
>
<browse_table
schema=
"public"
entity=
"AspNetUserClaims"
fk=
"FK_AspNetUserClaims_AspNetUsers_UserId"
x=
"440"
y=
"20"
width=
"500"
height=
"350"
/>
</browse_table>
</browser>
<query
id=
"Query_44b0b81"
name=
"Sample Query Builder"
>
<query_table
schema=
"public"
name=
"AspNetUsers"
alias=
"a"
x=
"48"
y=
"48"
>
<column
name=
"Id"
/>
<column
name=
"UserName"
/>
<column
name=
"NormalizedUserName"
/>
<column
name=
"Email"
/>
<column
name=
"NormalizedEmail"
/>
<column
name=
"EmailConfirmed"
/>
<column
name=
"PasswordHash"
/>
<column
name=
"SecurityStamp"
/>
<column
name=
"ConcurrencyStamp"
/>
<column
name=
"PhoneNumber"
/>
<column
name=
"PhoneNumberConfirmed"
/>
<column
name=
"TwoFactorEnabled"
/>
<column
name=
"LockoutEnd"
/>
<column
name=
"LockoutEnabled"
/>
<column
name=
"AccessFailedCount"
/>
<query_table
schema=
"public"
name=
"AspNetUserClaims"
alias=
"a1"
x=
"304"
y=
"48"
fk=
"FK_AspNetUserClaims_AspNetUsers_UserId"
type=
"Inner Join"
>
<column
name=
"Id"
/>
<column
name=
"UserId"
/>
<column
name=
"ClaimType"
/>
<column
name=
"ClaimValue"
/>
</query_table>
</query_table>
</query>
</layout>
</project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录