初始化项目

This commit is contained in:
2025-11-20 13:11:05 +08:00
commit d5edc62c08
2412 changed files with 2201918 additions and 0 deletions

View File

@@ -0,0 +1,343 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{709AA98F-388F-44DD-B64B-AD44E695C34C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AUTS.Domain</RootNamespace>
<AssemblyName>AUTS.Domain</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.21.9.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.21.9\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.1.3.5\lib\net462\K4os.Compression.LZ4.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.3.5\lib\net462\K4os.Compression.LZ4.Streams.dll</HintPath>
</Reference>
<Reference Include="K4os.Hash.xxHash, Version=1.0.8.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Hash.xxHash.1.0.8\lib\net462\K4os.Hash.xxHash.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.Entity.6.9.11\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
</Reference>
<Reference Include="Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
<HintPath>..\packages\SSH.NET.2016.1.0\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
<Reference Include="SqlSugar, Version=5.1.2.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SqlSugar.5.1.2.7\lib\SqlSugar.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Application\DBCofinStrModel.cs" />
<Compile Include="Application\OInternalNumber.cs" />
<Compile Include="Application\NurseScheduleStatisticsModel.cs" />
<Compile Include="Application\OutputValue.cs" />
<Compile Include="Application\RepairReason.cs" />
<Compile Include="Application\Sys_Currency.cs" />
<Compile Include="Application\TBL_ColorBoxList.cs" />
<Compile Include="Application\TBL_ImportInfo.cs" />
<Compile Include="Application\TBL_ImportinfoLog.cs" />
<Compile Include="Application\TBL_importinfo_log.cs" />
<Compile Include="Application\TBL_Process.cs" />
<Compile Include="Application\TBL_QA_TestLog.cs" />
<Compile Include="Application\TBL_RejectsExplain.cs" />
<Compile Include="Application\TBL_RepairLog.cs" />
<Compile Include="Application\TBL_RepairReason.cs" />
<Compile Include="Application\TBL_RepairResults.cs" />
<Compile Include="Application\TBL_RepairTypes.cs" />
<Compile Include="Application\TBL_shipping.cs" />
<Compile Include="Application\TBL_TestLog.cs" />
<Compile Include="Application\TBL_UTS_UserOperation.cs" />
<Compile Include="Application\ToDayCapacity.cs" />
<Compile Include="Application\uts_bindhistoryinfo_log.cs" />
<Compile Include="Application\uts_johao_tbl_importinfo.cs" />
<Compile Include="Application\uts_johao_tbl_shipping.cs" />
<Compile Include="Application\uts_zongqing_tbl_importinfo.cs" />
<Compile Include="Application\TBL_StationList_ForZongQing.cs" />
<Compile Include="Application\uts_zongqing_tbl_shipping.cs" />
<Compile Include="Application\Uts_Importinfo_Log.cs" />
<Compile Include="Entities\InHaosEntity.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>InHaosEntity.Context.tt</DependentUpon>
</Compile>
<Compile Include="Entities\InHaosEntity.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\InHaosEntity.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>InHaosEntity.edmx</DependentUpon>
</Compile>
<Compile Include="Entities\ManageEntity.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ManageEntity.Context.tt</DependentUpon>
</Compile>
<Compile Include="Entities\ManageEntity.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\ManageEntity.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ManageEntity.edmx</DependentUpon>
</Compile>
<Compile Include="Entities\SqlSugarBase.cs" />
<Compile Include="Entities\TBL_Customer.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_FlowCtr.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_Log.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_OrderInternal.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_Orders.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_ProductionLine.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_ProductionPlan.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_ProductTypes.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_Project.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_RepairRequest.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_SnList.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_SnRules.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_StationList.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_SyncList.cs">
<DependentUpon>InHaosEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_AppList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_AppLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_AuthLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_AuthManage.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_Company.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_DataServiceList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_DataServiceLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_DBList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_DevLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_ErrCode.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_LicenseList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_Log.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_Module.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_OrderStatus.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_SearchKey.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_ServiceLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_SwReleaseLog.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_SwUpdate.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_SyncList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_TestPlanTips.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_User.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_UserAuth_Operation.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Entities\TBL_UTS_Manage_UtsCmdList.cs">
<DependentUpon>ManageEntity.tt</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<EntityDeploy Include="Entities\ManageEntity.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>ManageEntity.Designer.cs</LastGenOutput>
</EntityDeploy>
<EntityDeploy Include="Entities\InHaosEntity.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>InHaosEntity.Designer.cs</LastGenOutput>
</EntityDeploy>
<None Include="Entities\InHaosEntity.edmx.diagram">
<DependentUpon>InHaosEntity.edmx</DependentUpon>
</None>
<None Include="Entities\ManageEntity.edmx.diagram">
<DependentUpon>ManageEntity.edmx</DependentUpon>
<SubType>Designer</SubType>
</None>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Entities\InHaosEntity.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>InHaosEntity.edmx</DependentUpon>
<LastGenOutput>InHaosEntity.Context.cs</LastGenOutput>
</Content>
<Content Include="Entities\InHaosEntity.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>InHaosEntity.edmx</DependentUpon>
<LastGenOutput>InHaosEntity.cs</LastGenOutput>
</Content>
<Content Include="Entities\ManageEntity.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ManageEntity.Context.cs</LastGenOutput>
<DependentUpon>ManageEntity.edmx</DependentUpon>
</Content>
<Content Include="Entities\ManageEntity.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>ManageEntity.edmx</DependentUpon>
<LastGenOutput>ManageEntity.cs</LastGenOutput>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

55
AUTS.Domain/App.config Normal file
View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider></providers>
</entityFramework>
<connectionStrings>
<add name="Uts_ManageEntities" connectionString="metadata=res://*/Entities.ManageEntity.csdl|res://*/Entities.ManageEntity.ssdl|res://*/Entities.ManageEntity.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=blv-rd.tech;user id=uts_manager;password=WoUts*#082k;persistsecurityinfo=True;port=3307;database=uts_manage&quot;" providerName="System.Data.EntityClient" />
<add name="Uts_InHaosEntities" connectionString="metadata=res://*/Entities.InHaosEntity.csdl|res://*/Entities.InHaosEntity.ssdl|res://*/Entities.InHaosEntity.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=blv-rd.tech;user id=uts_manager;password=WoUts*#082k;persistsecurityinfo=True;port=3307;database=uts_inhaos&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.12.0" newVersion="6.9.12.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.21.9.0" newVersion="3.21.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="K4os.Compression.LZ4.Streams" publicKeyToken="2186fa9121ef231d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.5.0" newVersion="1.3.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup><system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
/// <summary>
/// 数据库连接串实体
/// </summary>
public class DBCofinStrModel
{
/// <summary>
/// iD
/// </summary>
public int ID { get; set; }
/// <summary>
/// 数据库连接串
/// </summary>
public string CofinStr { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class Home
{
/// <summary>
/// 已确认
/// </summary>
public int Confirm { get; set; }
/// <summary>
/// 生产中
/// </summary>
public int Yield { get; set; }
/// <summary>
/// 已完成
/// </summary>
public int Accomplish { get; set; }
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class NurseScheduleStatisticsModel : DynamicObject
{
public string EmpName { get; set; }
public string TotalHour { get; set; }
public string TotalWork { get; set; }
Dictionary<string, object> Properties = new Dictionary<string, object>();
public override bool TrySetMember(SetMemberBinder binder, object value)
{
if (!Properties.Keys.Contains(binder.Name))
{
//在此可以做一些小动作
//if (binder.Name == "Col")
//  Properties.Add(binder.Name + (Properties.Count), value.ToString());
//else
//  Properties.Add(binder.Name, value.ToString());
Properties.Add(binder.Name, value.ToString());
}
return true;
}
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
return Properties.TryGetValue(binder.Name, out result);
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class OInternalNumber
{
/// <summary>
/// 已确认
/// </summary>
public int Confirm { get; set; }
/// <summary>
/// 分配条码
/// </summary>
public int BarCode { get; set; }
/// <summary>
/// 已排产
/// </summary>
public int Scheduling { get; set; }
/// <summary>
/// 生产中
/// </summary>
public int Yield { get; set; }
/// <summary>
/// 生产完成
/// </summary>
public int prodCompletion { get; set; }
/// <summary>
/// 已完成
/// </summary>
public int Accomplish { get; set; }
/// <summary>
/// 订单总数
/// </summary>
public int orderCount { get; set; }
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
/// <summary>
/// 产值查询实体
/// </summary>
public class OutputValueModel
{
public int ID { get; set; }
/// <summary>
/// 订单ID
/// </summary>
public int OrderID { get; set; }
/// <summary>
/// 产线ID
/// </summary>
public int ProductionLineID { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string ProductionLineName { get; set; }
/// <summary>
/// 生产时间
/// </summary>
public string ProductionTime { get; set; }
/// <summary>
/// 已完成产量
/// </summary>
public int ActualOutput { get; set; }
/// <summary>
/// 价格
/// </summary>
public float Price { get; set; }
/// <summary>
/// 价格
/// </summary>
public float OutputPrice { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class RepairReason
{
public int ID { get; set; }
public string RepairType { get; set; }
public string Name { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class Sys_Currency
{
/// <summary>
/// 币种
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 币种名称
/// </summary>
public string CurrencyName { get; set; }
/// <summary>
/// 币种符号
/// </summary>
public string CurrencySymbol { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_ColorBoxList
{
public int ID{get;set;}
public string Mo{get;set;}
public string Barcode { get; set; }
public string ColorBox_BarCode { get; set; }
public DateTime Import_DateTime { get; set; }
public DateTime Binding_DateTime { get; set; }
public int Binding_Status { get; set; }
public string Import_User { get; set; }
public string Import_IP { get; set; }
public string DeviceName { get; set;}
public string DevicePSK { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_ImportInfo
{
public int ID { get; set; }
public int ProjectID { get; set; }
public string Barcode { get; set; }
public DateTime ImportDateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string ColorBox_BarCode { get; set; }
public string OutBoxCode { get; set; }
public string MacCode { get; set; }
public string UnitWeigth { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_ImportinfoLog
{
public int ID { get; set; }
public int OType { get; set; }
public DateTime CreationTime { get; set; }
public string Calldb { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class TBL_Station
{
/// <summary>
/// 站ID
/// </summary>
public int StationID { get; set; }
/// <summary>
/// 站名
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 操作站类型
/// </summary>
public string StationType { get; set; }
/// <summary>
/// 工艺排序
/// </summary>
public int ArtworkOrder { get; set; }
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class TBL_QA_TestLog
{
/// <summary>
/// 用户ID
/// </summary>
public int UserID { get; set; }
/// <summary>
/// 序号
/// </summary>
public string DUT_SN { get; set; }
/// <summary>
/// 时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// 测试结果
/// </summary>
public bool TestResult { get; set; }
/// <summary>
/// 检测过程
/// </summary>
public string QA_FlowLog { get; set; }
/// <summary>
/// 检测备注
/// </summary>
public string QA_CheckResult { get; set; }
/// <summary>
/// 错误码
/// </summary>
public int FailSteps { get; set; } = 0;
/// <summary>
/// 错误信息
/// </summary>
public string FailMsg { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_RejectsExplain
{
public int id { get; set; }
public string Matlab { get; set; }
public string Introductions { get; set; }
public string Remark { get; set; }
public DateTime CreationTime { get; set; }
public DateTime UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
/**
*维修日志表
*/
public class TBL_RepairLog
{
public int ID { get; set; }
public int ProductID { get; set; }
public int StationID { get; set; }
public int OrderID { get; set; }
public int TestLogID { get; set; }
public string DUT_SN { get; set; }
public string TestPlan { get; set; }
public string FailSteps { get; set; }
public string FailMsg { get; set; }
public string ErrCode { get; set; }
public DateTime RepairDate { get; set; }
public DateTime UpdateTime { get; set; }
public int RepairType { get; set; }
public int RepairReason { get; set; }
public string RepairSource { get; set; }
public string ProductImg1 { get; set; }
public string ProductImg2 { get; set; }
public string ProductImg3 { get; set; }
public string ProductImg4 { get; set; }
public string DocuNumber { get; set; }
public string RepairComment { get; set; }
public int RepairResult { get; set; }
public int Userid { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_RepairReason
{
public int ID { get; set; }
public int RepairType { get; set; }
public string Name { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_RepairResults
{
public int ID { get; set; }
public string Name { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_RepairTypes
{
public int ID { get; set; }
public string Name { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
[SugarTable("TBL_StationList")]
public class TBL_StationList_ForZongQing
{
public int ID { get; set; }
public int ProjectID { get; set; }
public string StationName { get; set; }
public string StationType { get; set; }
public int ArtworkOrder { get; set; }
public int SnListOrder { get; set; }
public string StationDesc { get; set; }
public DateTime LastUpdateDate { get; set; }
public DateTime UpdateTime { get; set; }
public string LogTableName { get; set; }
public byte[] PreviewImage { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
/// <summary>
/// 测试记录实体
/// </summary>
public class TBL_TestLog
{
/// <summary>
/// ID
/// </summary>
public int ID { get; set; }
/// <summary>
/// sn号
/// </summary>
public string Tester_SN { get; set; }
/// <summary>
/// 测试结果
/// </summary>
public bool TestResult { get; set; }
/// <summary>
/// 订单ID
/// </summary>
public int OrderID { get; set; }
}
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_UTS_UserOperation
{
public int ID { get; set; }
public DateTime CreationTime { get; set; }
public string UserName { get; set; }
public string Ip { get; set; }
public string Browser { get; set; }
public string Operation { get; set; }
public string Database { get; set; }
public string Device { get; set; }
public string Location { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_importinfo_log
{
public int ID { get; set; }
public int ProjectID { get; set; }
public string Dbname { get; set; }
public string Operationtpye { get; set; }
public DateTime ImportDateTime { get; set; }
public string PartData { get; set; }
public int Result { get; set; }
public string ReturnResult { get; set; }
public string Ip { get; set; }
public string Address { get; set; }
public double Runtime { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class TBL_shipping
{
public int ID { get; private set; }
public string ShippingCode { get; private set; }
public string Creator { get; private set; }
public DateTime CreateDateTime { get; private set; }
public DateTime StartDateTime { get; private set; }
public DateTime EndDateTime { get; private set; }
public string Loader { get; private set; }
public int Status { get; private set; }
public string ShippingType { get; private set; }
public string Destination { get; private set; }
public string Voucher { get; private set; }
public string Remark { get; private set; }
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain
{
public class ToDayCapacity
{
/// <summary>
/// DUT序号
/// </summary>
public string DUT_SN { get; set; }
/// <summary>
/// 站位名
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 检测时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// T5-2检测时间
/// </summary>
public string DateTime_2nd { get; set; }
/// <summary>
/// 检测结果
/// </summary>
public bool TestResult { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class Uts_Importinfo_Log
{
public int ID { get; set; }
public int ProjectID { get; set; }
public string Dbname { get; set; }
public string Operationtpye { get; set; }
public DateTime ImportDateTime { get; set; }
public string PartData { get; set; }
public int Result { get; set; }
public string ReturnResult { get; set; }
public string Ip { get; set; }
public string Address { get; set; }
public double Runtime { get; set; }
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
namespace AUTS.Domain.Application
{
public class uts_bindhistoryinfo_log
{
[SugarColumn(IsIdentity =true, IsPrimaryKey = true)]
public int ID { get; set; }
[SugarColumn(ColumnDataType = "int", IsNullable = false)]
public int importinfoID { get; set; }
[SugarColumn(ColumnDataType = "datetime(3)", IsNullable=true)]
public DateTime operateTime { get; set; }
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
public int operateType { get; set; }
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
public int Result { get; set; }
[SugarColumn(ColumnDataType = "int", IsNullable = true)]
public int ProjectID { get; set; }
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
public string OutBoxCode { get; set; }
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
public string Barcode { get; set; }
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
public string ColorBox_BarCode { get; set; }
[SugarColumn(ColumnDataType = "varchar(100)", IsNullable = true)]
public string ShippingCode { get; set; }
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
public string Remark { get; set; }
[SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
public string ShippingOperator { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class uts_johao_tbl_importinfo
{
[SugarColumn(IsPrimaryKey = true)]//数据库是自增才配自增
public int ID { get; set; }
public int ProjectID { get; set; }
public string Barcode { get; set; }
public DateTime ImportDateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string ColorBox_BarCode { get; set; }
public string OutBoxCode { get; set; }
public string MacCode { get; set; }
public string UnitWeigth { get; set; }
public string LABEL_PRINT_CNT { get; set; }
public DateTime S1 { get; set; }
public DateTime S2 { get; set; }
public DateTime S3 { get; set; }
public DateTime S4 { get; set; }
public DateTime S5 { get; set; }
public DateTime S6 { get; set; }
public DateTime S7 { get; set; }
public DateTime S8 { get; set; }
public DateTime S9 { get; set; }
public DateTime S10 { get; set; }
public DateTime S11 { get; set; }
public DateTime S12 { get; set; }
public int Result1 { get; set; }
public int Result2 { get; set; }
public int Result3 { get; set; }
public int Result4 { get; set; }
public int Result5 { get; set; }
public int Result6 { get; set; }
public int Result7 { get; set; }
public int Result8 { get; set; }
public int Result9 { get; set; }
public int Result10 { get; set; }
public int Result11 { get; set; }
public int Result12 { get; set; }
public string MO { get; set; }
public string ShippingCode { get; set; }
public Nullable<DateTime> ShippingDateTime { get; set; }
public string ShippingLoader { get; set; }
public string F305_BLE_MAC { get; set; }
public string F305_RF_ADD { get; set; }
public string F305_DeviceName { get; set; }
public string F305_DevicePSK { get; set; }
public string F305_4G_IMEI { get; set; }
public string F305_4G_SIM_ID { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class uts_johao_tbl_shipping
{
[SugarColumn(IsPrimaryKey = true)]//数据库是自增才配自增
public int ID { get; set; }
public string ShippingCode { get; set; }
public string Creator { get; set; }
public DateTime CreateDateTime { get; set; }
public DateTime StartDateTime { get; set; }
public DateTime EndDateTime { get; set; }
public string Loader { get; set; }
public int Status { get; set; }
public string ShippingType { get; set; }
public string Destination { get; set; }
public string Voucher { get; set; }
public string Remark { get; set; }
public int ProjectID { get; set; }
public int QTY { get; set; }
public string MO { get; set; }
public string Customer { get; set; }
public int BindedColorBoxQTY { get; set; }
}
}

View File

@@ -0,0 +1,56 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class uts_zongqing_tbl_importinfo
{
[SugarColumn(IsPrimaryKey = true)]//数据库是自增才配自增
public int ID { get; set; }
public int ProjectID { get; set; }
public string Barcode { get; set; }
public DateTime ImportDateTime { get; set; }
public DateTime UpdateTime { get; set; }
public string ColorBox_BarCode { get; set; }
public string OutBoxCode { get; set; }
public string MacCode { get; set; }
public string UnitWeigth { get; set; }
public string LABEL_PRINT_CNT { get; set; }
public DateTime S1 { get; set; }
public DateTime S2 { get; set; }
public DateTime S3 { get; set; }
public DateTime S4 { get; set; }
public DateTime S5 { get; set; }
public DateTime S6 { get; set; }
public DateTime S7 { get; set; }
public DateTime S8 { get; set; }
public DateTime S9 { get; set; }
public DateTime S10 { get; set; }
public DateTime S11 { get; set; }
public DateTime S12 { get; set; }
public int Result1 { get; set; }
public int Result2 { get; set; }
public int Result3 { get; set; }
public int Result4 { get; set; }
public int Result5 { get; set; }
public int Result6 { get; set; }
public int Result7 { get; set; }
public int Result8 { get; set; }
public int Result9 { get; set; }
public int Result10 { get; set; }
public int Result11 { get; set; }
public int Result12 { get; set; }
public string Zima_UID { get; set; }
public string Zima_BLE_MAC { get; set; }
public string ZIMA_BATT_SN { get; set; }
public string ZIMA_TUYA_MAC { get; set; }
public string MO { get; set; }
public string ShippingCode { get; set; }
public Nullable<DateTime> ShippingDateTime { get; set; }
public string ShippingLoader { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Application
{
public class uts_zongqing_tbl_shipping
{
[SugarColumn(IsPrimaryKey = true)]//数据库是自增才配自增
public int ID { get; set; }
public string ShippingCode { get; set; }
public string Creator { get; set; }
public DateTime CreateDateTime { get; set; }
public DateTime StartDateTime { get; set; }
public DateTime EndDateTime { get; set; }
public string Loader { get; set; }
public int Status { get; set; }
public string ShippingType { get; set; }
public string Destination { get; set; }
public string Voucher { get; set; }
public string Remark { get; set; }
public int ProjectID { get; set; }
public int QTY { get; set; }
public string MO { get; set; }
public string Customer { get; set; }
public int BindedColorBoxQTY { get; set; }
}
}

View File

@@ -0,0 +1,43 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class Uts_InHaosEntities : DbContext
{
public Uts_InHaosEntities()
: base("name=Uts_InHaosEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<TBL_FlowCtr> TBL_FlowCtr { get; set; }
public virtual DbSet<TBL_Log> TBL_Log { get; set; }
public virtual DbSet<TBL_ProductionLine> TBL_ProductionLine { get; set; }
public virtual DbSet<TBL_SyncList> TBL_SyncList { get; set; }
public virtual DbSet<TBL_ProductionPlan> TBL_ProductionPlan { get; set; }
public virtual DbSet<TBL_SnRules> TBL_SnRules { get; set; }
public virtual DbSet<TBL_SnList> TBL_SnList { get; set; }
public virtual DbSet<TBL_ProductTypes> TBL_ProductTypes { get; set; }
public virtual DbSet<TBL_Customer> TBL_Customer { get; set; }
public virtual DbSet<TBL_Project> TBL_Project { get; set; }
public virtual DbSet<TBL_StationList> TBL_StationList { get; set; }
public virtual DbSet<TBL_OrderInternal> TBL_OrderInternal { get; set; }
public virtual DbSet<TBL_Orders> TBL_Orders { get; set; }
public virtual DbSet<TBL_RepairRequest> TBL_RepairRequestSet { get; set; }
}
}

View File

@@ -0,0 +1,636 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"InHaosEntity.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
var itemCollection = loader.CreateEdmItemCollection(inputFile);
var modelNamespace = loader.GetModelNamespace(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
if (container == null)
{
return string.Empty;
}
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#
PushIndent(" ");
}
#>
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
<#
if (container.FunctionImports.Any())
{
#>
using System.Data.Entity.Core.Objects;
using System.Linq;
<#
}
#>
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
{
public <#=code.Escape(container)#>()
: base("name=<#=container.Name#>")
{
<#
if (!loader.IsLazyLoadingEnabled(container))
{
#>
this.Configuration.LazyLoadingEnabled = false;
<#
}
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
// Note: the DbSet members are defined below such that the getter and
// setter always have the same accessibility as the DbSet definition
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
{
#>
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
<#
}
}
#>
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
<#
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
#>
<#=codeStringGenerator.DbSet(entitySet)#>
<#
}
foreach (var edmFunction in container.FunctionImports)
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
}
#>
}
<#
if (!String.IsNullOrEmpty(codeNamespace))
{
PopIndent();
#>
}
<#
}
#>
<#+
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
if (typeMapper.IsComposable(edmFunction))
{
#>
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
}
<#+
}
else
{
#>
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
}
<#+
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
}
}
}
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
{
#>
var <#=name#> = <#=isNotNull#> ?
<#=notNullInit#> :
<#=nullInit#>;
<#+
}
public const string TemplateId = "CSharp_DbContext_Context_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string DbSetInitializer(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} = Set<{1}>();",
_code.Escape(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,10 @@
// 为模型“D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\AUTS-DATA(uts-data)\AUTS.Domain\Entities\InHaosEntity.edmx”启用了 T4 代码生成。
// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时此属性会出现在
// “属性”窗口中。
// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是
// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体
// 类,请在设计器中打开该模型,右键单击设计器图面,然后
// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成
// 项...”。

View File

View File

@@ -0,0 +1,780 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Runtime content -->
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="Uts_InHaosModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<EntityType Name="TBL_Customer">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="CustomerAbbr" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="CustomerName" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="false" />
</EntityType>
<EntityType Name="TBL_FlowCtr">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="ProjectID" Type="int" />
<Property Name="SUT_SN" Type="varchar" MaxLength="254" />
<Property Name="ProcessRecord" Type="varchar" MaxLength="254" />
</EntityType>
<EntityType Name="TBL_Log">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" Nullable="false" />
<Property Name="UserID" Type="int" />
<Property Name="DateTime" Type="datetime" Precision="0" />
<Property Name="Operation" Type="varchar" MaxLength="254" />
</EntityType>
<EntityType Name="TBL_OrderInternal">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="OrderID" Type="int" Nullable="false" />
<Property Name="InternalNo" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="CompanyID" Type="int" />
<Property Name="ProductID" Type="int" />
<Property Name="ProductTypeID" Type="int" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="false" />
<Property Name="ObjectiveYield" Type="int" Nullable="false" />
<Property Name="ObjectiveYieldTotal" Type="int" Nullable="false" />
<Property Name="OrderStatus" Type="int" />
<Property Name="DeliveryTime" Type="datetime" Precision="0" />
<Property Name="Station" Type="varchar" MaxLength="254" />
<Property Name="BarCode" Type="varchar" MaxLength="254" />
</EntityType>
<EntityType Name="TBL_Orders">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="CompanyID" Type="int" Nullable="false" />
<Property Name="ProductID" Type="int" Nullable="false" />
<Property Name="ProductTypeID" Type="int" Nullable="false" />
<Property Name="OrderNo" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="OrderCount" Type="int" Nullable="false" />
<Property Name="DeliveryTime" Type="datetime" Precision="0" Nullable="false" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="false" />
<Property Name="CostPrice" Type="float" Nullable="false" />
<Property Name="TransactPrice" Type="float" Nullable="false" />
<Property Name="OrderStatus" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="TBL_ProductionLine">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Name" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="Description" Type="varchar" MaxLength="255" />
<Property Name="Remark" Type="varchar" MaxLength="255" />
</EntityType>
<EntityType Name="TBL_ProductionPlan">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="OrderID" Type="int" Nullable="false" />
<Property Name="ProductionLineID" Type="int" Nullable="false" />
<Property Name="OrderInternalID" Type="int" Nullable="false" />
<Property Name="StationID" Type="int" Nullable="false" />
<Property Name="ProductionTime" Type="datetime" Precision="0" Nullable="false" />
<Property Name="ActualOutput" Type="int" Nullable="false" />
<Property Name="ObjectiveYield" Type="int" Nullable="false" />
<Property Name="Remark" Type="varchar" MaxLength="255" />
<Property Name="Sn_Start" Type="varchar" MaxLength="255" />
<Property Name="Sn_End" Type="varchar" MaxLength="255" />
<Property Name="ObjectiveYieldTotal" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="TBL_ProductTypes">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="ProductType" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="Remark" Type="varchar" MaxLength="255" />
</EntityType>
<EntityType Name="TBL_Project">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="ProductTypeID" Type="int" />
<Property Name="ProjectName" Type="varchar" MaxLength="64" Nullable="false" />
<Property Name="Description" Type="varchar" MaxLength="64" />
<Property Name="UserID" Type="int" />
<Property Name="CreateTime" Type="datetime" Precision="0" />
<Property Name="Remark" Type="varchar" MaxLength="254" />
<Property Name="PreviewImage" Type="blob" />
<Property Name="Price" Type="float" />
<Property Name="Currency" Type="varchar" MaxLength="10" />
<Property Name="IsValid" Type="tinyint" />
<Property Name="EolDate" Type="datetime" Precision="0" />
<Property Name="ImageName" Type="varchar" MaxLength="255" />
<Property Name="Type" Type="int" />
<Property Name="SnType" Type="int" />
</EntityType>
<EntityType Name="TBL_SnList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="OrderID" Type="int" />
<Property Name="OrderInternalID" Type="int" />
<Property Name="ProductID" Type="int" Nullable="false" />
<Property Name="BarCode" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="false" />
<Property Name="UpdateTime" Type="datetime" Precision="0" />
<Property Name="SnType" Type="int" />
<Property Name="AssemblySn" Type="varchar" MaxLength="254" />
<Property Name="AssemblyTime" Type="datetime" Precision="0" />
<Property Name="S1" Type="datetime" Precision="0" />
<Property Name="S2" Type="datetime" Precision="0" />
<Property Name="S3" Type="datetime" Precision="0" />
<Property Name="S4" Type="datetime" Precision="0" />
<Property Name="S5" Type="datetime" Precision="0" />
<Property Name="S6" Type="datetime" Precision="0" />
<Property Name="S7" Type="datetime" Precision="0" />
<Property Name="S8" Type="datetime" Precision="0" />
<Property Name="S9" Type="datetime" Precision="0" />
<Property Name="S10" Type="datetime" Precision="0" />
<Property Name="S11" Type="datetime" Precision="0" />
<Property Name="S12" Type="datetime" Precision="0" />
<Property Name="Result1" Type="tinyint" />
<Property Name="Result2" Type="tinyint" />
<Property Name="Result3" Type="tinyint" />
<Property Name="Result4" Type="tinyint" />
<Property Name="Result5" Type="tinyint" />
<Property Name="Result6" Type="tinyint" />
<Property Name="Result7" Type="tinyint" />
<Property Name="Result8" Type="tinyint" />
<Property Name="Result9" Type="tinyint" />
<Property Name="Result10" Type="tinyint" />
<Property Name="Result11" Type="tinyint" />
<Property Name="Result12" Type="tinyint" />
</EntityType>
<EntityType Name="TBL_SnRules">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="OrderID" Type="int" Nullable="false" />
<Property Name="OrderInternalID" Type="int" Nullable="false" />
<Property Name="ProductID" Type="int" Nullable="false" />
<Property Name="StationIDs" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="Sn_Prefix" Type="varchar" MaxLength="255" />
<Property Name="Sn_Start" Type="varchar" MaxLength="11" Nullable="false" />
<Property Name="Sn_End" Type="varchar" MaxLength="11" Nullable="false" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="false" />
</EntityType>
<EntityType Name="TBL_StationList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="ProjectID" Type="int" Nullable="false" />
<Property Name="StationName" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="StationType" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="ArtworkOrder" Type="int" Nullable="false" />
<Property Name="StationDesc" Type="varchar" MaxLength="255" />
<Property Name="LastUpdateDate" Type="datetime" Precision="0" />
<Property Name="LogTableName" Type="varchar" MaxLength="255" />
<Property Name="BinPackage" Type="blob" />
<Property Name="BinPackageMd5" Type="varchar" MaxLength="255" />
<Property Name="PreviewImage" Type="blob" />
<Property Name="Remark" Type="varchar" MaxLength="255" />
<Property Name="PacketName" Type="varchar" MaxLength="255" />
<Property Name="SnListOrder" Type="int" />
<Property Name="IsValid" Type="tinyint" />
<Property Name="SnType" Type="int" />
<Property Name="EditPwd" Type="varchar" MaxLength="32" />
<Property Name="ReleasePwd" Type="varchar" MaxLength="32" />
<Property Name="PacketMd5" Type="varchar" MaxLength="32" />
</EntityType>
<EntityType Name="TBL_SyncList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="CurrentDate" Type="datetime" Precision="0" />
<Property Name="TableName" Type="varchar" MaxLength="254" Nullable="false" />
<Property Name="RevisionID" Type="int" Nullable="false" />
<Property Name="SyncType" Type="varchar" MaxLength="254" />
</EntityType>
<!--<EntityType Name="TBL_SyncList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="CurrentDate" Type="datetime" Precision="0" />
<Property Name="TableName" Type="varchar" MaxLength="254" Nullable="false" />
<Property Name="RevisionID" Type="int" Nullable="false" />
<Property Name="SyncType" Type="varchar" MaxLength="254" />
</EntityType>-->
<EntityType Name="TBL_RepairRequest">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="UserID" Type="int" Nullable="false"/>
<Property Name="RepairRequestNum" Type="varchar" MaxLength="254" Nullable="false" />
<Property Name="ProductID" Type="int" Nullable="false" />
<Property Name="Barcode" Type="varchar" MaxLength="254" Nullable="false" />
<Property Name="ProductImage" Type="varchar" MaxLength="254" Nullable="true" />
<Property Name="RejectSource" Type="varchar" MaxLength="254" Nullable="true" />
<Property Name="RejectCode" Type="varchar" MaxLength="254" Nullable="true" />
<Property Name="RejectDesc" Type="varchar" MaxLength="254" Nullable="true" />
<Property Name="CreateTime" Type="datetime" Precision="0" Nullable="true"/>
<Property Name="UpdateTime" Type="datetime" Precision="0" Nullable="true"/>
<Property Name="RepairProgress" Type="varchar" MaxLength="64" Nullable="true" />
<Property Name="RepairResult" Type="int" Nullable="true" />
<Property Name="RepairLogID" Type="int" Nullable="true" />
<Property Name="Repairier" Type="int" Nullable="true" />
<Property Name="Remark" Type="varchar" MaxLength="254" Nullable="true" />
<Property Name="ProductlMarking" Type="varchar" MaxLength="254" Nullable="true" />
</EntityType>
<EntityContainer Name="Uts_InHaosModelStoreContainer">
<EntitySet Name="TBL_Customer" EntityType="Self.TBL_Customer" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_FlowCtr" EntityType="Self.TBL_FlowCtr" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_Log" EntityType="Self.TBL_Log" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_OrderInternal" EntityType="Self.TBL_OrderInternal" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_Orders" EntityType="Self.TBL_Orders" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_ProductionLine" EntityType="Self.TBL_ProductionLine" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_ProductionPlan" EntityType="Self.TBL_ProductionPlan" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_ProductTypes" EntityType="Self.TBL_ProductTypes" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_Project" EntityType="Self.TBL_Project" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_SnList" EntityType="Self.TBL_SnList" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_SnRules" EntityType="Self.TBL_SnRules" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_StationList" EntityType="Self.TBL_StationList" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_SyncList" EntityType="Self.TBL_SyncList" Schema="uts_inhaos" store:Type="Tables" />
<EntitySet Name="TBL_RepairRequest" EntityType="Self.TBL_RepairRequest" Schema="uts_inhaos" store:Type="Tables" />
</EntityContainer>
</Schema></edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema Namespace="Uts_InHaosModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityContainer Name="Uts_InHaosEntities" annotation:LazyLoadingEnabled="true">
<EntitySet Name="TBL_FlowCtr" EntityType="Uts_InHaosModel.TBL_FlowCtr" />
<EntitySet Name="TBL_Log" EntityType="Uts_InHaosModel.TBL_Log" />
<EntitySet Name="TBL_ProductionLine" EntityType="Uts_InHaosModel.TBL_ProductionLine" />
<EntitySet Name="TBL_SyncList" EntityType="Uts_InHaosModel.TBL_SyncList" />
<EntitySet Name="TBL_ProductionPlan" EntityType="Uts_InHaosModel.TBL_ProductionPlan" />
<EntitySet Name="TBL_SnRules" EntityType="Uts_InHaosModel.TBL_SnRules" />
<EntitySet Name="TBL_SnList" EntityType="Uts_InHaosModel.TBL_SnList" />
<EntitySet Name="TBL_ProductTypes" EntityType="Uts_InHaosModel.TBL_ProductTypes" />
<EntitySet Name="TBL_Customer" EntityType="Uts_InHaosModel.TBL_Customer" />
<EntitySet Name="TBL_Project" EntityType="Uts_InHaosModel.TBL_Project" />
<EntitySet Name="TBL_StationList" EntityType="Uts_InHaosModel.TBL_StationList" />
<EntitySet Name="TBL_OrderInternal" EntityType="Uts_InHaosModel.TBL_OrderInternal" />
<EntitySet Name="TBL_Orders" EntityType="Uts_InHaosModel.TBL_Orders" />
<EntitySet Name="TBL_RepairRequestSet" EntityType="Uts_InHaosModel.TBL_RepairRequest" />
</EntityContainer>
<EntityType Name="TBL_FlowCtr">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="ProjectID" Type="Int32" />
<Property Name="SUT_SN" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
<Property Name="ProcessRecord" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_Log">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" />
<Property Name="UserID" Type="Int32" />
<Property Name="DateTime" Type="DateTime" />
<Property Name="Operation" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_ProductionLine">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Name" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="Description" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Remark" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_SyncList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="CurrentDate" Type="DateTime" />
<Property Name="TableName" Type="String" Nullable="false" MaxLength="254" FixedLength="false" Unicode="false" />
<Property Name="RevisionID" Type="Int32" Nullable="false" />
<Property Name="SyncType" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_ProductionPlan">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="OrderID" Type="Int32" Nullable="false" />
<Property Name="ProductionLineID" Type="Int32" Nullable="false" />
<Property Name="ProductionTime" Type="DateTime" Nullable="false" />
<Property Name="ActualOutput" Type="Int32" Nullable="false" />
<Property Name="ObjectiveYield" Type="Int32" Nullable="false" />
<Property Name="Remark" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Sn_Start" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Sn_End" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="OrderInternalID" Type="Int32" Nullable="false" />
<Property Name="ObjectiveYieldTotal" Type="Int32" Nullable="false" />
<Property Name="StationID" Type="Int32" Nullable="false" />
</EntityType>
<EntityType Name="TBL_SnRules">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="OrderID" Type="Int32" Nullable="false" />
<Property Name="OrderInternalID" Type="Int32" Nullable="false" />
<Property Name="ProductID" Type="Int32" Nullable="false" />
<Property Name="StationIDs" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Sn_Prefix" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Sn_Start" Type="String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" />
<Property Name="Sn_End" Type="String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
</EntityType>
<EntityType Name="TBL_SnList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="OrderID" Type="Int32" Nullable="false" />
<Property Name="OrderInternalID" Type="Int32" Nullable="false" />
<Property Name="ProductID" Type="Int32" Nullable="false" />
<Property Name="BarCode" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
<Property Name="S1" Type="DateTime" />
<Property Name="S2" Type="DateTime" />
<Property Name="S3" Type="DateTime" />
<Property Name="S4" Type="DateTime" />
<Property Name="S5" Type="DateTime" />
<Property Name="S6" Type="DateTime" />
<Property Name="S7" Type="DateTime" />
<Property Name="S8" Type="DateTime" />
<Property Name="S9" Type="DateTime" />
<Property Name="S10" Type="DateTime" />
<Property Name="S11" Type="DateTime" />
<Property Name="S12" Type="DateTime" />
<Property Name="UpdateTime" Type="DateTime" />
<Property Name="Result1" Type="SByte" />
<Property Name="Result2" Type="SByte" />
<Property Name="Result3" Type="SByte" />
<Property Name="Result4" Type="SByte" />
<Property Name="Result5" Type="SByte" />
<Property Name="Result6" Type="SByte" />
<Property Name="Result7" Type="SByte" />
<Property Name="Result8" Type="SByte" />
<Property Name="Result9" Type="SByte" />
<Property Name="Result10" Type="SByte" />
<Property Name="Result11" Type="SByte" />
<Property Name="Result12" Type="SByte" />
<Property Name="SnType" Type="Int32" />
<Property Name="AssemblySn" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
<Property Name="AssemblyTime" Type="DateTime" />
</EntityType>
<EntityType Name="TBL_ProductTypes">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="ProductType" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Remark" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_Customer">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="CustomerAbbr" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="CustomerName" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
</EntityType>
<EntityType Name="TBL_Project">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="ProductTypeID" Type="Int32" />
<Property Name="ProjectName" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="Description" Type="String" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="UserID" Type="Int32" />
<Property Name="CreateTime" Type="DateTime" />
<Property Name="Remark" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
<Property Name="PreviewImage" Type="Binary" MaxLength="Max" FixedLength="false" />
<Property Name="Price" Type="Single" />
<Property Name="Currency" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="IsValid" Type="SByte" />
<Property Name="EolDate" Type="DateTime" />
<Property Name="ImageName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="Type" Type="Int32" />
<Property Name="SnType" Type="Int32" />
</EntityType>
<EntityType Name="TBL_StationList">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="ProjectID" Type="Int32" Nullable="false" />
<Property Name="StationName" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="StationType" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="ArtworkOrder" Type="Int32" Nullable="false" />
<Property Name="StationDesc" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="LastUpdateDate" Type="DateTime" />
<Property Name="LogTableName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="BinPackage" Type="Binary" MaxLength="Max" FixedLength="false" />
<Property Name="BinPackageMd5" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="PreviewImage" Type="Binary" MaxLength="Max" FixedLength="false" />
<Property Name="Remark" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="PacketName" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
<Property Name="SnListOrder" Type="Int32" />
<Property Name="IsValid" Type="SByte" />
<Property Name="SnType" Type="Int32" />
<Property Name="EditPwd" Type="String" MaxLength="32" FixedLength="false" Unicode="false" />
<Property Name="ReleasePwd" Type="String" MaxLength="32" FixedLength="false" Unicode="false" />
<Property Name="PacketMd5" Type="String" MaxLength="32" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_OrderInternal">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="OrderID" Type="Int32" Nullable="false" />
<Property Name="InternalNo" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="CompanyID" Type="Int32" />
<Property Name="ProductID" Type="Int32" />
<Property Name="ProductTypeID" Type="Int32" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
<Property Name="ObjectiveYield" Type="Int32" Nullable="false" />
<Property Name="ObjectiveYieldTotal" Type="Int32" Nullable="false" />
<Property Name="OrderStatus" Type="Int32" />
<Property Name="DeliveryTime" Type="DateTime" />
<Property Name="Station" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
<Property Name="BarCode" Type="String" MaxLength="254" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="TBL_Orders">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="CompanyID" Type="Int32" Nullable="false" />
<Property Name="ProductID" Type="Int32" Nullable="false" />
<Property Name="ProductTypeID" Type="Int32" Nullable="false" />
<Property Name="OrderNo" Type="String" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
<Property Name="OrderCount" Type="Int32" Nullable="false" />
<Property Name="DeliveryTime" Type="DateTime" Nullable="false" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
<Property Name="CostPrice" Type="Single" Nullable="false" />
<Property Name="TransactPrice" Type="Single" Nullable="false" />
<Property Name="OrderStatus" Type="Int32" Nullable="false" />
</EntityType>
<EntityType Name="TBL_RepairRequest">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="UserID" Type="Int32" Nullable="false" />
<Property Name="RepairRequestNum" Type="String" Nullable="false" />
<Property Name="ProductID" Type="Int32" Nullable="false" />
<Property Name="Barcode" Type="String" Nullable="false" />
<Property Name="ProductImage" Type="String" Nullable="false" />
<Property Name="RejectSource" Type="String" Nullable="false" />
<Property Name="RejectCode" Type="String" Nullable="false" />
<Property Name="RejectDesc" Type="String" Nullable="false" />
<Property Name="CreateTime" Type="DateTime" Nullable="false" />
<Property Name="UpdateTime" Type="DateTime" Nullable="false" />
<Property Name="RepairProgress" Type="String" Nullable="false" />
<Property Name="RepairResult" Type="Int32" Nullable="false" />
<Property Name="RepairLogID" Type="Int32" Nullable="false" />
<Property Name="Repairier" Type="Int32" Nullable="false" />
<Property Name="Remark" Type="String" Nullable="false" />
</EntityType>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
<edmx:Mappings>
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
<EntityContainerMapping StorageEntityContainer="Uts_InHaosModelStoreContainer" CdmEntityContainer="Uts_InHaosEntities">
<EntitySetMapping Name="TBL_FlowCtr">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_FlowCtr">
<MappingFragment StoreEntitySet="TBL_FlowCtr">
<ScalarProperty Name="ProcessRecord" ColumnName="ProcessRecord" />
<ScalarProperty Name="SUT_SN" ColumnName="SUT_SN" />
<ScalarProperty Name="ProjectID" ColumnName="ProjectID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_Log">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_Log">
<MappingFragment StoreEntitySet="TBL_Log">
<ScalarProperty Name="Operation" ColumnName="Operation" />
<ScalarProperty Name="DateTime" ColumnName="DateTime" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_ProductionLine">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_ProductionLine">
<MappingFragment StoreEntitySet="TBL_ProductionLine">
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="Description" ColumnName="Description" />
<ScalarProperty Name="Name" ColumnName="Name" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_SyncList">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_SyncList">
<MappingFragment StoreEntitySet="TBL_SyncList">
<ScalarProperty Name="SyncType" ColumnName="SyncType" />
<ScalarProperty Name="RevisionID" ColumnName="RevisionID" />
<ScalarProperty Name="TableName" ColumnName="TableName" />
<ScalarProperty Name="CurrentDate" ColumnName="CurrentDate" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_ProductionPlan">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_ProductionPlan">
<MappingFragment StoreEntitySet="TBL_ProductionPlan">
<ScalarProperty Name="StationID" ColumnName="StationID" />
<ScalarProperty Name="ObjectiveYieldTotal" ColumnName="ObjectiveYieldTotal" />
<ScalarProperty Name="OrderInternalID" ColumnName="OrderInternalID" />
<ScalarProperty Name="Sn_End" ColumnName="Sn_End" />
<ScalarProperty Name="Sn_Start" ColumnName="Sn_Start" />
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="ObjectiveYield" ColumnName="ObjectiveYield" />
<ScalarProperty Name="ActualOutput" ColumnName="ActualOutput" />
<ScalarProperty Name="ProductionTime" ColumnName="ProductionTime" />
<ScalarProperty Name="ProductionLineID" ColumnName="ProductionLineID" />
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_SnRules">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_SnRules">
<MappingFragment StoreEntitySet="TBL_SnRules">
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="Sn_End" ColumnName="Sn_End" />
<ScalarProperty Name="Sn_Start" ColumnName="Sn_Start" />
<ScalarProperty Name="Sn_Prefix" ColumnName="Sn_Prefix" />
<ScalarProperty Name="StationIDs" ColumnName="StationIDs" />
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
<ScalarProperty Name="OrderInternalID" ColumnName="OrderInternalID" />
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_SnList">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_SnList">
<MappingFragment StoreEntitySet="TBL_SnList">
<ScalarProperty Name="AssemblyTime" ColumnName="AssemblyTime" />
<ScalarProperty Name="AssemblySn" ColumnName="AssemblySn" />
<ScalarProperty Name="SnType" ColumnName="SnType" />
<ScalarProperty Name="Result12" ColumnName="Result12" />
<ScalarProperty Name="Result11" ColumnName="Result11" />
<ScalarProperty Name="Result10" ColumnName="Result10" />
<ScalarProperty Name="Result9" ColumnName="Result9" />
<ScalarProperty Name="Result8" ColumnName="Result8" />
<ScalarProperty Name="Result7" ColumnName="Result7" />
<ScalarProperty Name="Result6" ColumnName="Result6" />
<ScalarProperty Name="Result5" ColumnName="Result5" />
<ScalarProperty Name="Result4" ColumnName="Result4" />
<ScalarProperty Name="Result3" ColumnName="Result3" />
<ScalarProperty Name="Result2" ColumnName="Result2" />
<ScalarProperty Name="Result1" ColumnName="Result1" />
<ScalarProperty Name="UpdateTime" ColumnName="UpdateTime" />
<ScalarProperty Name="S12" ColumnName="S12" />
<ScalarProperty Name="S11" ColumnName="S11" />
<ScalarProperty Name="S10" ColumnName="S10" />
<ScalarProperty Name="S9" ColumnName="S9" />
<ScalarProperty Name="S8" ColumnName="S8" />
<ScalarProperty Name="S7" ColumnName="S7" />
<ScalarProperty Name="S6" ColumnName="S6" />
<ScalarProperty Name="S5" ColumnName="S5" />
<ScalarProperty Name="S4" ColumnName="S4" />
<ScalarProperty Name="S3" ColumnName="S3" />
<ScalarProperty Name="S2" ColumnName="S2" />
<ScalarProperty Name="S1" ColumnName="S1" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="BarCode" ColumnName="BarCode" />
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
<ScalarProperty Name="OrderInternalID" ColumnName="OrderInternalID" />
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_ProductTypes">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_ProductTypes">
<MappingFragment StoreEntitySet="TBL_ProductTypes">
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="ProductType" ColumnName="ProductType" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_Customer">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_Customer">
<MappingFragment StoreEntitySet="TBL_Customer">
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="CustomerName" ColumnName="CustomerName" />
<ScalarProperty Name="CustomerAbbr" ColumnName="CustomerAbbr" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_Project">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_Project">
<MappingFragment StoreEntitySet="TBL_Project">
<ScalarProperty Name="SnType" ColumnName="SnType" />
<ScalarProperty Name="Type" ColumnName="Type" />
<ScalarProperty Name="ImageName" ColumnName="ImageName" />
<ScalarProperty Name="EolDate" ColumnName="EolDate" />
<ScalarProperty Name="IsValid" ColumnName="IsValid" />
<ScalarProperty Name="Currency" ColumnName="Currency" />
<ScalarProperty Name="Price" ColumnName="Price" />
<ScalarProperty Name="PreviewImage" ColumnName="PreviewImage" />
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="Description" ColumnName="Description" />
<ScalarProperty Name="ProjectName" ColumnName="ProjectName" />
<ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_StationList">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_StationList">
<MappingFragment StoreEntitySet="TBL_StationList">
<ScalarProperty Name="PacketMd5" ColumnName="PacketMd5" />
<ScalarProperty Name="ReleasePwd" ColumnName="ReleasePwd" />
<ScalarProperty Name="EditPwd" ColumnName="EditPwd" />
<ScalarProperty Name="SnType" ColumnName="SnType" />
<ScalarProperty Name="IsValid" ColumnName="IsValid" />
<ScalarProperty Name="SnListOrder" ColumnName="SnListOrder" />
<ScalarProperty Name="PacketName" ColumnName="PacketName" />
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="PreviewImage" ColumnName="PreviewImage" />
<ScalarProperty Name="BinPackageMd5" ColumnName="BinPackageMd5" />
<ScalarProperty Name="BinPackage" ColumnName="BinPackage" />
<ScalarProperty Name="LogTableName" ColumnName="LogTableName" />
<ScalarProperty Name="LastUpdateDate" ColumnName="LastUpdateDate" />
<ScalarProperty Name="StationDesc" ColumnName="StationDesc" />
<ScalarProperty Name="ArtworkOrder" ColumnName="ArtworkOrder" />
<ScalarProperty Name="StationType" ColumnName="StationType" />
<ScalarProperty Name="StationName" ColumnName="StationName" />
<ScalarProperty Name="ProjectID" ColumnName="ProjectID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_OrderInternal">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_OrderInternal">
<MappingFragment StoreEntitySet="TBL_OrderInternal">
<ScalarProperty Name="BarCode" ColumnName="BarCode" />
<ScalarProperty Name="Station" ColumnName="Station" />
<ScalarProperty Name="DeliveryTime" ColumnName="DeliveryTime" />
<ScalarProperty Name="OrderStatus" ColumnName="OrderStatus" />
<ScalarProperty Name="ObjectiveYieldTotal" ColumnName="ObjectiveYieldTotal" />
<ScalarProperty Name="ObjectiveYield" ColumnName="ObjectiveYield" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
<ScalarProperty Name="CompanyID" ColumnName="CompanyID" />
<ScalarProperty Name="InternalNo" ColumnName="InternalNo" />
<ScalarProperty Name="OrderID" ColumnName="OrderID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_Orders">
<EntityTypeMapping TypeName="Uts_InHaosModel.TBL_Orders">
<MappingFragment StoreEntitySet="TBL_Orders">
<ScalarProperty Name="OrderStatus" ColumnName="OrderStatus" />
<ScalarProperty Name="TransactPrice" ColumnName="TransactPrice" />
<ScalarProperty Name="CostPrice" ColumnName="CostPrice" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="DeliveryTime" ColumnName="DeliveryTime" />
<ScalarProperty Name="OrderCount" ColumnName="OrderCount" />
<ScalarProperty Name="OrderNo" ColumnName="OrderNo" />
<ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
<ScalarProperty Name="CompanyID" ColumnName="CompanyID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="TBL_RepairRequestSet">
<EntityTypeMapping TypeName="IsTypeOf(Uts_InHaosModel.TBL_RepairRequest)">
<MappingFragment StoreEntitySet="TBL_RepairRequest">
<!--<ScalarProperty Name="ProductlMarking" ColumnName="ProductlMarking" />-->
<ScalarProperty Name="Remark" ColumnName="Remark" />
<ScalarProperty Name="Repairier" ColumnName="Repairier" />
<ScalarProperty Name="RepairLogID" ColumnName="RepairLogID" />
<ScalarProperty Name="RepairResult" ColumnName="RepairResult" />
<ScalarProperty Name="RepairProgress" ColumnName="RepairProgress" />
<ScalarProperty Name="UpdateTime" ColumnName="UpdateTime" />
<ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
<ScalarProperty Name="RejectDesc" ColumnName="RejectDesc" />
<ScalarProperty Name="RejectCode" ColumnName="RejectCode" />
<ScalarProperty Name="RejectSource" ColumnName="RejectSource" />
<ScalarProperty Name="ProductImage" ColumnName="ProductImage" />
<ScalarProperty Name="Barcode" ColumnName="Barcode" />
<ScalarProperty Name="ProductID" ColumnName="ProductID" />
<ScalarProperty Name="RepairRequestNum" ColumnName="RepairRequestNum" />
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="ID" ColumnName="ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>
</edmx:Runtime>
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<Connection>
<DesignerInfoPropertySet>
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
</DesignerInfoPropertySet>
</Connection>
<Options>
<DesignerInfoPropertySet>
<DesignerProperty Name="ValidateOnBuild" Value="true" />
<DesignerProperty Name="EnablePluralization" Value="false" />
<DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
<DesignerProperty Name="UseLegacyProvider" Value="false" />
<DesignerProperty Name="CodeGenerationStrategy" Value="无" />
</DesignerInfoPropertySet>
</Options>
<!-- Diagram content (shape and connector positions) -->
<Diagrams></Diagrams>
</Designer>
</edmx:Edmx>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="151a8c58f52a4202a3c014c3e9d5354a" Name="Diagram1">
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_FlowCtr" Width="1.5" PointX="2.75" PointY="0.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_Log" Width="1.5" PointX="0.75" PointY="3.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_ProductionLine" Width="1.5" PointX="4.75" PointY="0.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_SyncList" Width="1.5" PointX="0.875" PointY="6.25" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_ProductionPlan" Width="1.5" PointX="9.375" PointY="0.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_SnRules" Width="1.5" PointX="11" PointY="5.25" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_SnList" PointX="13" PointY="0.5" Width="1.5" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_ProductTypes" Width="1.5" PointX="9.375" PointY="4.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_Customer" Width="1.5" PointX="7.75" PointY="7.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_Project" Width="1.5" PointX="2.75" PointY="9.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_StationList" Width="1.5" PointX="4.75" PointY="9.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_OrderInternal" Width="1.5" PointX="3.375" PointY="3.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_Orders" Width="1.5" PointX="5.375" PointY="3.75" />
<EntityTypeShape EntityType="Uts_InHaosModel.TBL_RepairRequest" Width="1.5" PointX="7.25" PointY="2.625" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
</edmx:Edmx>

View File

@@ -0,0 +1,733 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"InHaosEntity.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
{
return string.Empty;
}
WriteHeader(codeStringGenerator, fileManager);
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
{
fileManager.StartNewFile(entity.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
<#=codeStringGenerator.EntityClassOpening(entity)#>
{
<#
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
var complexProperties = typeMapper.GetComplexProperties(entity);
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public <#=code.Escape(entity)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var navigationProperty in collectionNavigationProperties)
{
#>
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var complexProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(complexProperty)#>
<#
}
}
var navigationProperties = typeMapper.GetNavigationProperties(entity);
if (navigationProperties.Any())
{
#>
<#
foreach (var navigationProperty in navigationProperties)
{
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
<#
}
#>
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
{
fileManager.StartNewFile(complex.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
{
<#
var complexProperties = typeMapper.GetComplexProperties(complex);
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
{
#>
public <#=code.Escape(complex)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(complex);
if (simpleProperties.Any())
{
foreach(var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var edmProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
{
fileManager.StartNewFile(enumType.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#
if (typeMapper.EnumIsFlags(enumType))
{
#>
[Flags]
<#
}
#>
<#=codeStringGenerator.EnumOpening(enumType)#>
{
<#
var foundOne = false;
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
{
foundOne = true;
#>
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
<#
}
if (foundOne)
{
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
}
#>
}
<#
EndNamespace(code);
}
fileManager.Process();
#>
<#+
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
{
fileManager.StartHeader();
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
<#+
fileManager.EndBlock();
}
public void BeginNamespace(CodeGenerationTools code)
{
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#+
PushIndent(" ");
}
}
public void EndNamespace(CodeGenerationTools code)
{
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
{
PopIndent();
#>
}
<#+
}
}
public const string TemplateId = "CSharp_DbContext_Types_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class Uts_ManageEntities : DbContext
{
public Uts_ManageEntities()
: base("name=Uts_ManageEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<TBL_UTS_Manage_TestPlanTips> TBL_UTS_Manage_TestPlanTips { get; set; }
public virtual DbSet<TBL_UTS_Manage_ServiceLog> TBL_UTS_Manage_ServiceLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_ErrCode> TBL_UTS_Manage_ErrCode { get; set; }
public virtual DbSet<TBL_UTS_Manage_AuthManage> TBL_UTS_Manage_AuthManage { get; set; }
public virtual DbSet<TBL_UTS_Manage_Module> TBL_UTS_Manage_Module { get; set; }
public virtual DbSet<TBL_UTS_Manage_AppList> TBL_UTS_Manage_AppList { get; set; }
public virtual DbSet<TBL_UTS_Manage_AppLog> TBL_UTS_Manage_AppLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_DataServiceList> TBL_UTS_Manage_DataServiceList { get; set; }
public virtual DbSet<TBL_UTS_Manage_DataServiceLog> TBL_UTS_Manage_DataServiceLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_DevLog> TBL_UTS_Manage_DevLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_LicenseList> TBL_UTS_Manage_LicenseList { get; set; }
public virtual DbSet<TBL_UTS_Manage_Log> TBL_UTS_Manage_Log { get; set; }
public virtual DbSet<TBL_UTS_Manage_SearchKey> TBL_UTS_Manage_SearchKey { get; set; }
public virtual DbSet<TBL_UTS_Manage_SwReleaseLog> TBL_UTS_Manage_SwReleaseLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_SwUpdate> TBL_UTS_Manage_SwUpdate { get; set; }
public virtual DbSet<TBL_UTS_Manage_SyncList> TBL_UTS_Manage_SyncList { get; set; }
public virtual DbSet<TBL_UTS_Manage_User> TBL_UTS_Manage_User { get; set; }
public virtual DbSet<TBL_UTS_Manage_UserAuth_Operation> TBL_UTS_Manage_UserAuth_Operation { get; set; }
public virtual DbSet<TBL_UTS_Manage_UtsCmdList> TBL_UTS_Manage_UtsCmdList { get; set; }
public virtual DbSet<TBL_UTS_Manage_AuthLog> TBL_UTS_Manage_AuthLog { get; set; }
public virtual DbSet<TBL_UTS_Manage_OrderStatus> TBL_UTS_Manage_OrderStatus { get; set; }
public virtual DbSet<TBL_UTS_Manage_DBList> TBL_UTS_Manage_DBList { get; set; }
public virtual DbSet<TBL_UTS_Manage_Company> TBL_UTS_Manage_Company { get; set; }
}
}

View File

@@ -0,0 +1,636 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"ManageEntity.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
var itemCollection = loader.CreateEdmItemCollection(inputFile);
var modelNamespace = loader.GetModelNamespace(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
if (container == null)
{
return string.Empty;
}
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#
PushIndent(" ");
}
#>
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
<#
if (container.FunctionImports.Any())
{
#>
using System.Data.Entity.Core.Objects;
using System.Linq;
<#
}
#>
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
{
public <#=code.Escape(container)#>()
: base("name=<#=container.Name#>")
{
<#
if (!loader.IsLazyLoadingEnabled(container))
{
#>
this.Configuration.LazyLoadingEnabled = false;
<#
}
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
// Note: the DbSet members are defined below such that the getter and
// setter always have the same accessibility as the DbSet definition
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
{
#>
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
<#
}
}
#>
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
<#
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
#>
<#=codeStringGenerator.DbSet(entitySet)#>
<#
}
foreach (var edmFunction in container.FunctionImports)
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
}
#>
}
<#
if (!String.IsNullOrEmpty(codeNamespace))
{
PopIndent();
#>
}
<#
}
#>
<#+
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
if (typeMapper.IsComposable(edmFunction))
{
#>
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
}
<#+
}
else
{
#>
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
}
<#+
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
}
}
}
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
{
#>
var <#=name#> = <#=isNotNull#> ?
<#=notNullInit#> :
<#=nullInit#>;
<#+
}
public const string TemplateId = "CSharp_DbContext_Context_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string DbSetInitializer(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} = Set<{1}>();",
_code.Escape(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,10 @@
// 为模型“D:\NewGitRepos\AUTS-DATA\AUTS.Domain\Entities\ManageEntity.edmx”启用了 T4 代码生成。
// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时此属性会出现在
// “属性”窗口中。
// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是
// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体
// 类,请在设计器中打开该模型,右键单击设计器图面,然后
// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成
// 项...”。

View File

@@ -0,0 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="60616cae545046229af779a4fe88eb80" Name="Diagram1" ZoomLevel="64">
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_TestPlanTips" Width="1.5" PointX="2.375" PointY="0.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_ServiceLog" Width="1.5" PointX="6" PointY="2.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_ErrCode" Width="1.5" PointX="6" PointY="0.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_AuthManage" Width="1.5" PointX="2.25" PointY="3.625" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_Module" Width="1.5" PointX="0.5" PointY="3.625" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_AppList" Width="1.5" PointX="0.75" PointY="0.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_AppLog" Width="1.5" PointX="4.125" PointY="0.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_DataServiceList" PointX="6.375" PointY="12.75" Width="2.25" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_DataServiceLog" Width="1.5" PointX="8" PointY="6.5" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_DevLog" Width="1.5" PointX="10.25" PointY="5.5" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_LicenseList" Width="1.5" PointX="8" PointY="1" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_Log" Width="1.5" PointX="10.25" PointY="3.125" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_SearchKey" Width="1.5" PointX="5.5" PointY="9.375" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_SwReleaseLog" Width="1.5" PointX="4.125" PointY="6.125" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_SwUpdate" Width="1.5" PointX="2" PointY="6.5" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_SyncList" Width="1.5" PointX="0.5" PointY="10.625" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_User" Width="2.375" PointX="2.625" PointY="9.875" IsExpanded="true" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_UserAuth_Operation" Width="1.5" PointX="7.875" PointY="3.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_UtsCmdList" Width="1.5" PointX="12.25" PointY="0.75" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_AuthLog" Width="1.5" PointX="10.25" PointY="0.875" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_OrderStatus" Width="1.5" PointX="7.875" PointY="9.625" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_DBList" Width="1.5" PointX="9.625" PointY="9.625" />
<EntityTypeShape EntityType="Uts_ManageModel.TBL_UTS_Manage_Company" Width="1.5" PointX="5.5" PointY="11.5" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
</edmx:Edmx>

View File

@@ -0,0 +1,733 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"ManageEntity.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
{
return string.Empty;
}
WriteHeader(codeStringGenerator, fileManager);
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
{
fileManager.StartNewFile(entity.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
<#=codeStringGenerator.EntityClassOpening(entity)#>
{
<#
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
var complexProperties = typeMapper.GetComplexProperties(entity);
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public <#=code.Escape(entity)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var navigationProperty in collectionNavigationProperties)
{
#>
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var complexProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(complexProperty)#>
<#
}
}
var navigationProperties = typeMapper.GetNavigationProperties(entity);
if (navigationProperties.Any())
{
#>
<#
foreach (var navigationProperty in navigationProperties)
{
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
<#
}
#>
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
{
fileManager.StartNewFile(complex.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
{
<#
var complexProperties = typeMapper.GetComplexProperties(complex);
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
{
#>
public <#=code.Escape(complex)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(complex);
if (simpleProperties.Any())
{
foreach(var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var edmProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
{
fileManager.StartNewFile(enumType.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#
if (typeMapper.EnumIsFlags(enumType))
{
#>
[Flags]
<#
}
#>
<#=codeStringGenerator.EnumOpening(enumType)#>
{
<#
var foundOne = false;
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
{
foundOne = true;
#>
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
<#
}
if (foundOne)
{
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
}
#>
}
<#
EndNamespace(code);
}
fileManager.Process();
#>
<#+
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
{
fileManager.StartHeader();
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
<#+
fileManager.EndBlock();
}
public void BeginNamespace(CodeGenerationTools code)
{
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#+
PushIndent(" ");
}
}
public void EndNamespace(CodeGenerationTools code)
{
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
{
PopIndent();
#>
}
<#+
}
}
public const string TemplateId = "CSharp_DbContext_Types_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,99 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AUTS.Domain.Entities
{
public class SqlSugarBase
{
public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
{
DbType = SqlSugar.DbType.MySql,
ConnectionString = "Server=blv-rd.tech;Database=uts_manage;Uid=uts_manager;Pwd=WoUts*#082k;charset=utf8;port=3307;",
IsAutoCloseConnection = true
},
db =>
{
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
//Type[] types = Assembly
//.LoadFrom($@"D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\cxwMin\cxw\AUTS.Web\bin\AUTS.Domain.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
//.GetTypes().Where(it => it.FullName.Contains("AUTS.Domain.CxwAll."))//命名空间过滤,当然你也可以写其他条件过滤
//.ToArray();//断点调试一下是不是需要的Type不是需要的在进行过滤
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
//单例参数配置,所有上下文生效
db.Aop.OnLogExecuting = (s, p) =>
{
Debug.WriteLine(s);
};
});
public static SqlSugarScope DbZongQing = new SqlSugarScope(new ConnectionConfig()
{
DbType = SqlSugar.DbType.MySql,
ConnectionString = "Server=blv-rd.tech;Database=uts_ZongQing;Uid=uts_manager;Pwd=WoUts*#082k;charset=utf8;port=3307;",
IsAutoCloseConnection = true
},
db =>
{
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
//Type[] types = Assembly
//.LoadFrom($@"D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\cxwMin\cxw\AUTS.Web\bin\AUTS.Domain.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
//.GetTypes().Where(it => it.FullName.Contains("AUTS.Domain.CxwAll."))//命名空间过滤,当然你也可以写其他条件过滤
//.ToArray();//断点调试一下是不是需要的Type不是需要的在进行过滤
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
//单例参数配置,所有上下文生效
db.Aop.OnLogExecuting = (s, p) =>
{
Debug.WriteLine(s);
};
});
public static SqlSugarScope DbZongQingClone = new SqlSugarScope(new ConnectionConfig()
{
DbType = SqlSugar.DbType.MySql,
ConnectionString = "Server=db.uts-data.com;Database=uts_ZongQing;Uid=uts_manager;Pwd=WoUts*#082k;charset=utf8;port=3307;",
IsAutoCloseConnection = true
},
db =>
{
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
//Type[] types = Assembly
//.LoadFrom($@"D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\cxwMin\cxw\AUTS.Web\bin\AUTS.Domain.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
//.GetTypes().Where(it => it.FullName.Contains("AUTS.Domain.CxwAll."))//命名空间过滤,当然你也可以写其他条件过滤
//.ToArray();//断点调试一下是不是需要的Type不是需要的在进行过滤
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
//单例参数配置,所有上下文生效
db.Aop.OnLogExecuting = (s, p) =>
{
Debug.WriteLine(s);
};
});
public static SqlSugarScope ClientDb = new SqlSugarScope(new ConnectionConfig()
{
DbType = SqlSugar.DbType.MySql,
ConnectionString = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=uts_db;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307",
IsAutoCloseConnection = true
},
db =>
{
//db.DbMaintenance.CreateDatabase(); //个别数据库不支持
//Type[] types = Assembly
//.LoadFrom($@"D:\BLV_SYNC\RD_WEB\SynologyDrive\欧阳磊\cxwMin\cxw\AUTS.Web\bin\AUTS.Domain.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
//.GetTypes().Where(it => it.FullName.Contains("AUTS.Domain.CxwAll."))//命名空间过滤,当然你也可以写其他条件过滤
//.ToArray();//断点调试一下是不是需要的Type不是需要的在进行过滤
//db.CodeFirst.SetStringDefaultLength(200).InitTables(types);//根据types创建表
//单例参数配置,所有上下文生效
db.Aop.OnLogExecuting = (s, p) =>
{
Debug.WriteLine(s);
};
});
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_Customer
{
public int ID { get; set; }
public string CustomerAbbr { get; set; }
public string CustomerName { get; set; }
public System.DateTime CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_FlowCtr
{
public int ID { get; set; }
public Nullable<int> ProjectID { get; set; }
public string SUT_SN { get; set; }
public string ProcessRecord { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_Log
{
public int ID { get; set; }
public Nullable<int> UserID { get; set; }
public Nullable<System.DateTime> DateTime { get; set; }
public string Operation { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_OrderInternal
{
public int ID { get; set; }
public int OrderID { get; set; }
public string InternalNo { get; set; }
public Nullable<int> CompanyID { get; set; }
public Nullable<int> ProductID { get; set; }
public Nullable<int> ProductTypeID { get; set; }
public System.DateTime CreateTime { get; set; }
public int ObjectiveYield { get; set; }
public int ObjectiveYieldTotal { get; set; }
public Nullable<int> OrderStatus { get; set; }
public Nullable<System.DateTime> DeliveryTime { get; set; }
public string Station { get; set; }
public string BarCode { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_Orders
{
public int ID { get; set; }
public int CompanyID { get; set; }
public int ProductID { get; set; }
public int ProductTypeID { get; set; }
public string OrderNo { get; set; }
public int OrderCount { get; set; }
public System.DateTime DeliveryTime { get; set; }
public System.DateTime CreateTime { get; set; }
public float CostPrice { get; set; }
public float TransactPrice { get; set; }
public int OrderStatus { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_ProductTypes
{
public int ID { get; set; }
public string ProductType { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_ProductionLine
{
public int ID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_ProductionPlan
{
public int ID { get; set; }
public int OrderID { get; set; }
public int ProductionLineID { get; set; }
public System.DateTime ProductionTime { get; set; }
public int ActualOutput { get; set; }
public int ObjectiveYield { get; set; }
public string Remark { get; set; }
public string Sn_Start { get; set; }
public string Sn_End { get; set; }
public int OrderInternalID { get; set; }
public int ObjectiveYieldTotal { get; set; }
public int StationID { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_Project
{
public int ID { get; set; }
public Nullable<int> ProductTypeID { get; set; }
public string ProjectName { get; set; }
public string Description { get; set; }
public Nullable<int> UserID { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string Remark { get; set; }
public byte[] PreviewImage { get; set; }
public Nullable<float> Price { get; set; }
public string Currency { get; set; }
public Nullable<sbyte> IsValid { get; set; }
public Nullable<System.DateTime> EolDate { get; set; }
public string ImageName { get; set; }
public Nullable<int> Type { get; set; }
public Nullable<int> SnType { get; set; }
}
}

View File

@@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_RepairRequest
{
public int ID { get; set; }
public int UserID { get; set; }
public string RepairRequestNum { get; set; }
public int ProductID { get; set; }
public string Barcode { get; set; }
public string ProductImage { get; set; }
public string RejectSource { get; set; }
public string RejectCode { get; set; }
public string RejectDesc { get; set; }
public System.DateTime CreateTime { get; set; }
public System.DateTime UpdateTime { get; set; }
public string RepairProgress { get; set; }
public int RepairResult { get; set; }
public int RepairLogID { get; set; }
public int Repairier { get; set; }
public string Remark { get; set; }
public string DetailRemark { get; set; }
public int Statement { get; set; }
//public string ProductMarking { get; set; }
public int Payer { get; set; }
public int Storage { get; set; }
public string Salesman { get; set; }
}
}

View File

@@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_SnList
{
public int ID { get; set; }
public int OrderID { get; set; }
public int OrderInternalID { get; set; }
public int ProductID { get; set; }
public string BarCode { get; set; }
public System.DateTime CreateTime { get; set; }
public Nullable<System.DateTime> S1 { get; set; }
public Nullable<System.DateTime> S2 { get; set; }
public Nullable<System.DateTime> S3 { get; set; }
public Nullable<System.DateTime> S4 { get; set; }
public Nullable<System.DateTime> S5 { get; set; }
public Nullable<System.DateTime> S6 { get; set; }
public Nullable<System.DateTime> S7 { get; set; }
public Nullable<System.DateTime> S8 { get; set; }
public Nullable<System.DateTime> S9 { get; set; }
public Nullable<System.DateTime> S10 { get; set; }
public Nullable<System.DateTime> S11 { get; set; }
public Nullable<System.DateTime> S12 { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public Nullable<sbyte> Result1 { get; set; }
public Nullable<sbyte> Result2 { get; set; }
public Nullable<sbyte> Result3 { get; set; }
public Nullable<sbyte> Result4 { get; set; }
public Nullable<sbyte> Result5 { get; set; }
public Nullable<sbyte> Result6 { get; set; }
public Nullable<sbyte> Result7 { get; set; }
public Nullable<sbyte> Result8 { get; set; }
public Nullable<sbyte> Result9 { get; set; }
public Nullable<sbyte> Result10 { get; set; }
public Nullable<sbyte> Result11 { get; set; }
public Nullable<sbyte> Result12 { get; set; }
public Nullable<int> SnType { get; set; }
public string AssemblySn { get; set; }
public Nullable<System.DateTime> AssemblyTime { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_SnRules
{
public int ID { get; set; }
public int OrderID { get; set; }
public int OrderInternalID { get; set; }
public int ProductID { get; set; }
public string StationIDs { get; set; }
public string Sn_Prefix { get; set; }
public string Sn_Start { get; set; }
public string Sn_End { get; set; }
public System.DateTime CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_StationList
{
public int ID { get; set; }
public int ProjectID { get; set; }
public string StationName { get; set; }
public string StationType { get; set; }
public int ArtworkOrder { get; set; }
public string StationDesc { get; set; }
public Nullable<System.DateTime> LastUpdateDate { get; set; }
public string LogTableName { get; set; }
public byte[] BinPackage { get; set; }
public string BinPackageMd5 { get; set; }
public byte[] PreviewImage { get; set; }
public string Remark { get; set; }
public string PacketName { get; set; }
public Nullable<int> SnListOrder { get; set; }
public Nullable<sbyte> IsValid { get; set; }
public Nullable<int> SnType { get; set; }
public string EditPwd { get; set; }
public string ReleasePwd { get; set; }
public string PacketMd5 { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_SyncList
{
public int ID { get; set; }
public Nullable<System.DateTime> CurrentDate { get; set; }
public string TableName { get; set; }
public int RevisionID { get; set; }
public string SyncType { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_AppList
{
public int ID { get; set; }
public Nullable<int> ServiceID { get; set; }
public Nullable<int> AppID { get; set; }
public string AppName { get; set; }
public string AppVersion { get; set; }
public Nullable<System.DateTime> RegisterDateTime { get; set; }
public Nullable<System.DateTime> LastActiveDateTime { get; set; }
public string LastInfomation { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_AppLog
{
public int ID { get; set; }
public Nullable<int> ServiceID { get; set; }
public string AppName { get; set; }
public string AppVersion { get; set; }
public string ProjectName { get; set; }
public string StationName { get; set; }
public string TestPlan { get; set; }
public Nullable<System.DateTime> DateTime { get; set; }
public string LogType { get; set; }
public string LogText { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_AuthLog
{
public int ID { get; set; }
public Nullable<int> UserID { get; set; }
public Nullable<int> AuthID { get; set; }
public Nullable<int> Auth { get; set; }
public bool Exist { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_AuthManage
{
public int ID { get; set; }
public string ModuleID { get; set; }
public string Describe { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_Company
{
public int ID { get; set; }
public string CustomerName { get; set; }
public System.DateTime CreateTime { get; set; }
public System.DateTime UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_DBList
{
public int ID { get; set; }
public Nullable<int> CompanyID { get; set; }
public string DatabaseName { get; set; }
public string DatabaseUser { get; set; }
public string DatabasePassword { get; set; }
public string DatabaseDesc { get; set; }
public System.DateTime UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_DataServiceList
{
public int ID { get; set; }
public Nullable<int> LicenseID { get; set; }
public string LicenseValidDateTime { get; set; }
public string CompanyName { get; set; }
public string TerminalOS { get; set; }
public string TerminalType { get; set; }
public string TerminalName { get; set; }
public string TerminalAlias { get; set; }
public string TerminalMAC { get; set; }
public string ServiceVersion { get; set; }
public Nullable<System.DateTime> ServiceRegisterDateTime { get; set; }
public Nullable<System.DateTime> ServiceLastActiveDateTime { get; set; }
public Nullable<sbyte> ServiceValid { get; set; }
public bool IsOnline { get; set; }
public Nullable<System.DateTime> ServiceOnlineDateTime { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string ErrMsg { get; set; }
public string USVer { get; set; }
public Nullable<bool> USIsOnline { get; set; }
public string USErrMsg { get; set; }
public Nullable<int> ManageStatus { get; set; }
public string NetworkNeiborhood { get; set; }
public Nullable<int> CacheCount { get; set; }
public Nullable<int> IsDBProxyConn { get; set; }
public Nullable<int> Roles { get; set; }
public string BarnchNet { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_DataServiceLog
{
public int ID { get; set; }
public Nullable<int> ServiceID { get; set; }
public string ServiceVersion { get; set; }
public string UpdateServiceVersion { get; set; }
public string VendorName { get; set; }
public Nullable<System.DateTime> DateTime { get; set; }
public string PublicIp { get; set; }
public string PrivateIp { get; set; }
public string LogType { get; set; }
public string LogText { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_DevLog
{
public int ID { get; set; }
public Nullable<int> DevID { get; set; }
public Nullable<System.DateTime> DateTime { get; set; }
public string Public_IP { get; set; }
public string Private_IP { get; set; }
public string LicFileName { get; set; }
public string AppName { get; set; }
public string AppVersion { get; set; }
public string TestPlan { get; set; }
public Nullable<int> UserID { get; set; }
public string Operation { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_ErrCode
{
public string ErrCode { get; set; }
public string ErrMsg { get; set; }
public string ErrColor { get; set; }
public System.DateTime UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_LicenseList
{
public int ID { get; set; }
public string CompanyName { get; set; }
public Nullable<System.DateTime> ReleaseDate { get; set; }
public Nullable<System.DateTime> ValidDateTime { get; set; }
public string Remark { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_Log
{
public int ID { get; set; }
public int UserID { get; set; }
public System.DateTime DateTime { get; set; }
public string Operation { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_Module
{
public int ID { get; set; }
public string Operation { get; set; }
public string Controller { get; set; }
public string Method { get; set; }
public Nullable<bool> Exist { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_OrderStatus
{
public int ID { get; set; }
public string StatusName { get; set; }
public string Remark { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_SearchKey
{
public int ID { get; set; }
public int DataBaseID { get; set; }
public string SearchVarKey { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_ServiceLog
{
public int ID { get; set; }
public string AppName { get; set; }
public Nullable<System.DateTime> DateTime { get; set; }
public string DevPublicIP { get; set; }
public string DevPrivateIP { get; set; }
public string DevMac { get; set; }
public string DevOS { get; set; }
public string DevName { get; set; }
public string DevUserName { get; set; }
public string DevOnline { get; set; }
public string LogType { get; set; }
public string LogText { get; set; }
public string CompanyName { get; set; }
public string AppVersion { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_SwReleaseLog
{
public int ID { get; set; }
public string SoftwareName { get; set; }
public System.DateTime ReleaseDate { get; set; }
public string ReleaseVersion { get; set; }
public Nullable<int> UserID { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_SwUpdate
{
public int ID { get; set; }
public string SoftwareName { get; set; }
public string LastVersion { get; set; }
public Nullable<System.DateTime> ReleaseDate { get; set; }
public byte[] BinPackage { get; set; }
public string BinPackageMd5 { get; set; }
public string PackageName { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_SyncList
{
public int ID { get; set; }
public string TableName { get; set; }
public int RevisionID { get; set; }
public string SyncType { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_TestPlanTips
{
public int ID { get; set; }
public string ColName { get; set; }
public string ColType { get; set; }
public string ColDesc { get; set; }
public string ColValue { get; set; }
public System.DateTime UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_User
{
public int ID { get; set; }
public int CompanyID { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string Mobile { get; set; }
public string WeiXin { get; set; }
public string Email { get; set; }
public bool IsValid { get; set; }
public bool IsAdmin { get; set; }
public string BarCode { get; set; }
public bool SetBarCode { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public bool AccountBill { get; set; }
public string PlaintextPwd { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_UserAuth_Operation
{
public int ID { get; set; }
public int UserID { get; set; }
public int DatabaseID { get; set; }
public string DatabaseName { get; set; }
public string FullAccess { get; set; }
public string ReadWriteAccess { get; set; }
public string ReadOnlyAccess { get; set; }
}
}

View File

@@ -0,0 +1,64 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AUTS.Domain.Entities
{
using System;
using System.Collections.Generic;
public partial class TBL_UTS_Manage_UtsCmdList
{
public int ID { get; set; }
public string CmdType { get; set; }
public string CmdName { get; set; }
public string CmdDesc { get; set; }
public string ParamCount { get; set; }
public string ParamDesc1 { get; set; }
public string ParamDesc2 { get; set; }
public string ParamDesc3 { get; set; }
public string ParamDesc4 { get; set; }
public string ParamDesc5 { get; set; }
public string ParamDesc6 { get; set; }
public string ParamDesc7 { get; set; }
public string ParamDesc8 { get; set; }
public string ParamType1 { get; set; }
public string ParamType2 { get; set; }
public string ParamType3 { get; set; }
public string ParamType4 { get; set; }
public string ParamType5 { get; set; }
public string ParamType6 { get; set; }
public string ParamType7 { get; set; }
public string ParamType8 { get; set; }
public string ParamLower1 { get; set; }
public string ParamLower2 { get; set; }
public string ParamLower3 { get; set; }
public string ParamLower4 { get; set; }
public string ParamLower5 { get; set; }
public string ParamLower6 { get; set; }
public string ParamLower7 { get; set; }
public string ParamLower8 { get; set; }
public string ParamUpper1 { get; set; }
public string ParamUpper2 { get; set; }
public string ParamUpper3 { get; set; }
public string ParamUpper4 { get; set; }
public string ParamUpper5 { get; set; }
public string ParamUpper6 { get; set; }
public string ParamUpper7 { get; set; }
public string ParamUpper8 { get; set; }
public string ParamValue1 { get; set; }
public string ParamValue2 { get; set; }
public string ParamValue3 { get; set; }
public string ParamValue4 { get; set; }
public string ParamValue5 { get; set; }
public string ParamValue6 { get; set; }
public string ParamValue7 { get; set; }
public string ParamValue8 { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("AUTS.Domain")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AUTS.Domain")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("709aa98f-388f-44dd-b64b-ad44e695c34c")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net461" />
<package id="EntityFramework" version="6.4.4" targetFramework="net461" />
<package id="Google.Protobuf" version="3.21.9" targetFramework="net48" />
<package id="K4os.Compression.LZ4" version="1.3.5" targetFramework="net48" />
<package id="K4os.Compression.LZ4.Streams" version="1.3.5" targetFramework="net48" />
<package id="K4os.Hash.xxHash" version="1.0.8" targetFramework="net48" />
<package id="MySql.Data" version="6.9.12" targetFramework="net48" />
<package id="MySql.Data.Entity" version="6.9.11" targetFramework="net461" />
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net461" />
<package id="SqlSugar" version="5.1.2.7" targetFramework="net461" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net461" />
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
<package id="System.IO.Pipelines" version="5.0.2" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
</packages>