<?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="AttributeData" >
			<column name="Id" type="uuid" decimal="0" jt="1111" mandatory="y" />
			<column name="KeyName" type="text" decimal="0" jt="12" mandatory="y" />
			<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" />
			<column name="DeviceId" type="uuid" decimal="0" jt="1111" />
			<column name="DateTime" type="timestamp" length="29" decimal="6" jt="93" mandatory="y" />
			<column name="Discriminator" type="text" decimal="0" jt="12" mandatory="y" />
			<column name="Scope" type="integer" length="10" decimal="0" jt="4" />
			<column name="DeviceId1" type="uuid" decimal="0" jt="1111" />
			<column name="TelemetryData_DeviceId1" type="uuid" decimal="0" jt="1111" />
			<column name="TelemetryLatest_DeviceId1" type="uuid" decimal="0" jt="1111" />
			<index name="PK_AttributeData" unique="PRIMARY_KEY" >
				<column name="Id" />
			</index>
			<index name="IX_AttributeData_DeviceId" unique="NORMAL" >
				<column name="DeviceId" />
			</index>
			<index name="IX_AttributeData_DeviceId1" unique="NORMAL" >
				<column name="DeviceId1" />
			</index>
			<index name="IX_AttributeData_TelemetryData_DeviceId1" unique="NORMAL" >
				<column name="TelemetryData_DeviceId1" />
			</index>
			<index name="IX_AttributeData_TelemetryLatest_DeviceId1" unique="NORMAL" >
				<column name="TelemetryLatest_DeviceId1" />
			</index>
			<fk name="FK_AttributeData_Device_DeviceId" to_schema="public" to_table="Device" delete_action="restrict" >
				<fk_column name="DeviceId" pk="Id" />
			</fk>
			<fk name="FK_AttributeData_Device_DeviceId1" to_schema="public" to_table="Device" delete_action="restrict" >
				<fk_column name="DeviceId1" pk="Id" />
			</fk>
			<fk name="FK_AttributeData_Device_TelemetryData_DeviceId1" to_schema="public" to_table="Device" delete_action="cascade" >
				<fk_column name="TelemetryData_DeviceId1" pk="Id" />
			</fk>
			<fk name="FK_AttributeData_Device_TelemetryLatest_DeviceId1" to_schema="public" to_table="Device" delete_action="cascade" >
				<fk_column name="TelemetryLatest_DeviceId1" pk="Id" />
			</fk>
		</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="CustomerId" type="uuid" decimal="0" jt="1111" />
			<column name="TenantId" type="uuid" decimal="0" jt="1111" />
			<column name="Id" type="uuid" decimal="0" jt="1111" mandatory="y" />
			<column name="IdentityId" type="text" decimal="0" jt="12" />
			<index name="IX_Relationship_TenantId" unique="NORMAL" >
				<column name="TenantId" />
			</index>
			<index name="IX_Relationship_CustomerId" unique="NORMAL" >
				<column name="CustomerId" />
			</index>
			<index name="PK_Relationship" unique="PRIMARY_KEY" >
				<column name="Id" />
			</index>
			<index name="IX_Relationship_IdentityId" unique="NORMAL" >
				<column name="IdentityId" />
			</index>
			<fk name="FK_Relationship_AspNetUsers_IdentityId" to_schema="public" to_table="AspNetUsers" delete_action="restrict" >
				<fk_column name="IdentityId" pk="Id" />
			</fk>
			<fk name="FK_Relationship_Customer_CustomerId" to_schema="public" to_table="Customer" delete_action="restrict" >
				<fk_column name="CustomerId" pk="Id" />
			</fk>
			<fk name="FK_Relationship_Tenant_TenantId" to_schema="public" to_table="Tenant" delete_action="restrict" >
				<fk_column name="TenantId" pk="Id" />
			</fk>
		</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="127.0.0.1" port="5432" instance="IoTSharp" user="postgres" passwd="ZnV0dXJl" />
	<layout name="Default Layout" id="Layout_159a766" show_relation="columns" >
		<entity schema="public" name="AspNetRoles" color="C7F4BE" x="1040" y="80" />
		<entity schema="public" name="AspNetUserLogins" color="C7F4BE" x="864" y="432" />
		<entity schema="public" name="AspNetRoleClaims" color="C7F4BE" x="1248" y="80" />
		<entity schema="public" name="__EFMigrationsHistory" color="F4DDBE" x="624" y="768" />
		<entity schema="public" name="AspNetUsers" color="C7F4BE" x="624" y="80" />
		<entity schema="public" name="AspNetUserRoles" color="C7F4BE" x="864" y="80" />
		<entity schema="public" name="AspNetUserTokens" color="C7F4BE" x="624" y="432" />
		<entity schema="public" name="AspNetUserClaims" color="C7F4BE" x="864" y="256" />
		<entity schema="public" name="Relationship" color="BED3F4" x="336" y="544" />
		<entity schema="public" name="Customer" color="BED3F4" x="48" y="272" />
		<entity schema="public" name="Tenant" color="BED3F4" x="192" y="272" />
		<entity schema="public" name="Device" color="BED3F4" x="192" y="80" />
		<entity schema="public" name="AttributeData" color="BED3F4" x="352" y="80" />
		<group name="Device" color="ECF0F7" >
			<entity schema="public" name="Device" />
			<entity schema="public" name="Tenant" />
			<entity schema="public" name="Customer" />
			<entity schema="public" name="Relationship" />
			<entity schema="public" name="AttributeData" />
		</group>
		<group name="AspNetUsers" color="EEF7EC" >
			<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>
	</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="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="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="Relationship" />
		</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>