[성현모] CPMeta DB 추가
This commit is contained in:
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class CPMetaContext : DbContext
|
||||
{
|
||||
public CPMetaContext(DbContextOptions<CPMetaContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<tWbmsMetum> tWbmsMeta { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<tWbmsMetum>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.cProductID).HasName("PK_cProductKey");
|
||||
|
||||
entity.HasIndex(e => e.cMacAddress, "UQ_cMacAddress").IsUnique();
|
||||
|
||||
entity.Property(e => e.cProductID).HasMaxLength(50);
|
||||
entity.Property(e => e.cMacAddress).HasMaxLength(50);
|
||||
entity.Property(e => e.cProductNo).HasMaxLength(50);
|
||||
entity.Property(e => e.cSpareValue).HasMaxLength(200);
|
||||
entity.Property(e => e.cType).HasMaxLength(20);
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SystemX.Core.DB;
|
||||
|
||||
public partial class tWbmsMetum
|
||||
{
|
||||
public string cProductID { get; set; } = null!;
|
||||
|
||||
public string? cMacAddress { get; set; }
|
||||
|
||||
public string? cType { get; set; }
|
||||
|
||||
public string? cProductNo { get; set; }
|
||||
|
||||
public string? cSpareValue { get; set; }
|
||||
|
||||
public DateTime cDateTime { get; set; }
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Name>SystemX.DB.CPMeta</Name>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>4.1</ProjectVersion>
|
||||
<ProjectGuid>{17ab3eb0-6388-401f-96df-e45ba58a548e}</ProjectGuid>
|
||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||
<OutputType>Database</OutputType>
|
||||
<RootPath>
|
||||
</RootPath>
|
||||
<RootNamespace>SystemX.DB.CPMeta</RootNamespace>
|
||||
<AssemblyName>SystemX.DB.CPMeta</AssemblyName>
|
||||
<ModelCollation>1042,CI</ModelCollation>
|
||||
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
|
||||
<DeployToDatabase>True</DeployToDatabase>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetLanguage>CS</TargetLanguage>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<SqlServerVerification>False</SqlServerVerification>
|
||||
<IncludeCompositeObjects>True</IncludeCompositeObjects>
|
||||
<TargetDatabaseSet>True</TargetDatabaseSet>
|
||||
<GenerateCreateScript>True</GenerateCreateScript>
|
||||
<DefaultCollation>Korean_Wansung_CI_AS</DefaultCollation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatTSqlWarningsAsErrors>False</TreatTSqlWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
|
||||
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
|
||||
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
|
||||
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties" />
|
||||
<Folder Include="dbo" />
|
||||
<Folder Include="dbo\Tables" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Build Include="dbo\Tables\tWbmsMeta.sql" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy /y $(ProjectDir)$(OutputPath)$(TargetName)_Create.sql $(SolutionDir)..\..\DBPatch\sqlScripts\
|
||||
|
||||
xcopy /y $(ProjectDir)$(OutputPath)$(TargetName).dacpac $(SolutionDir)..\..\DBPatch\sqlScripts\dacpac\</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,13 @@
|
||||
CREATE TABLE [dbo].[tWbmsMeta]
|
||||
(
|
||||
[cProductID] NVARCHAR(50) NOT NULL,
|
||||
[cMacAddress] NVARCHAR(50) NULL,
|
||||
[cType] NVARCHAR(20) NULL,
|
||||
[cProductNo] NVARCHAR(50) NULL,
|
||||
|
||||
[cSpareValue] NVARCHAR(200) NULL,
|
||||
[cDateTime] DATETIME2 NOT NULL,
|
||||
|
||||
CONSTRAINT PK_cProductKey PRIMARY KEY (cProductID),
|
||||
CONSTRAINT UQ_cMacAddress UNIQUE (cMacAddress),
|
||||
)
|
||||
@ -19,6 +19,8 @@ Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SystemX.DB.CPXV2", "DB\Syst
|
||||
EndProject
|
||||
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SystemX.DB.CPXV2Log", "DB\SystemX.DB.CPXV2Log\SystemX.DB.CPXV2Log.sqlproj", "{D9439C52-76B5-4908-9B0D-43D1F52EC942}"
|
||||
EndProject
|
||||
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SystemX.DB.CPMeta", "SystemX.Core.DB\SystemX.DB.CPMeta\SystemX.DB.CPMeta.sqlproj", "{17AB3EB0-6388-401F-96DF-E45BA58A548E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -63,6 +65,12 @@ Global
|
||||
{D9439C52-76B5-4908-9B0D-43D1F52EC942}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9439C52-76B5-4908-9B0D-43D1F52EC942}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9439C52-76B5-4908-9B0D-43D1F52EC942}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -73,6 +81,7 @@ Global
|
||||
{5D374F06-D9FA-4159-BC84-1F3CA506F50E} = {C8D5274F-AC00-46C7-1F8D-E88E81087A52}
|
||||
{3A2D7552-9C12-489F-8A0B-330E000C860D} = {C8D5274F-AC00-46C7-1F8D-E88E81087A52}
|
||||
{D9439C52-76B5-4908-9B0D-43D1F52EC942} = {C8D5274F-AC00-46C7-1F8D-E88E81087A52}
|
||||
{17AB3EB0-6388-401F-96DF-E45BA58A548E} = {C8D5274F-AC00-46C7-1F8D-E88E81087A52}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A26A3BD0-2161-41FA-949A-DEA966E8F798}
|
||||
|
||||
Reference in New Issue
Block a user