Skip to content

Commit

Permalink
Adicionar arquivos de projeto.
Browse files Browse the repository at this point in the history
  • Loading branch information
Candidato Antlia committed Apr 4, 2019
1 parent 633f610 commit 0c90f3c
Show file tree
Hide file tree
Showing 73 changed files with 40,188 additions and 0 deletions.
57 changes: 57 additions & 0 deletions MovimentosManuais.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - UI", "1 - UI", "{14776C96-138D-4CB9-B641-351C92593001}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 - Domain", "2 - Domain", "{2A99158F-C275-4211-9AF0-27E5D6C74994}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 -Infrastructure", "3 -Infrastructure", "{C586434E-0DFA-4905-80E0-2A7D6CBBDD14}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovimentosManuais.InfraStruture", "src\MovimentosManuais.InfraStruture\MovimentosManuais.InfraStruture.csproj", "{D95EB535-F7EF-4255-9AB6-283D91A465C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovimentosManuais.ApplicationCore", "src\MovimentosManuais.ApplicationCore\MovimentosManuais.ApplicationCore.csproj", "{AD4695C4-62A1-484D-9195-0A0BB762EEDE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4 - Api", "4 - Api", "{3521BA3E-892C-4D8A-9C0B-F388E94A22D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovimentosManuais.Api", "src\MovimentosManuais.Api\MovimentosManuais.Api.csproj", "{C1CE6423-A5D3-4724-9F15-129210E3BFBD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovimentosManuais.UI", "src\MovimentosManuais.UI\MovimentosManuais.UI.csproj", "{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Release|Any CPU.Build.0 = Release|Any CPU
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Release|Any CPU.Build.0 = Release|Any CPU
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Release|Any CPU.Build.0 = Release|Any CPU
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D95EB535-F7EF-4255-9AB6-283D91A465C3} = {C586434E-0DFA-4905-80E0-2A7D6CBBDD14}
{AD4695C4-62A1-484D-9195-0A0BB762EEDE} = {2A99158F-C275-4211-9AF0-27E5D6C74994}
{C1CE6423-A5D3-4724-9F15-129210E3BFBD} = {3521BA3E-892C-4D8A-9C0B-F388E94A22D2}
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB} = {14776C96-138D-4CB9-B641-351C92593001}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C25CB48F-085F-449C-AC93-014422F0ED5C}
EndGlobalSection
EndGlobal
23 changes: 23 additions & 0 deletions src/MovimentosManuais.Api/MovimentosManuais.Api.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MovimentosManuais.ApplicationCore\MovimentosManuais.ApplicationCore.csproj" />
<ProjectReference Include="..\MovimentosManuais.InfraStruture\MovimentosManuais.InfraStruture.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>

</Project>
24 changes: 24 additions & 0 deletions src/MovimentosManuais.Api/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace MovimentosManuais.Api
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
30 changes: 30 additions & 0 deletions src/MovimentosManuais.Api/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:1269",
"sslPort": 44388
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MovimentosManuais.Api": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
38 changes: 38 additions & 0 deletions src/MovimentosManuais.Api/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using MovimentosManuais.InfraStruture.Data;

namespace MovimentosManuais.Api
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfiguration Configuration { get; }

public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

services.AddDbContext<MovimentosManuaisContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DataBaseConnection")));
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
}
}
9 changes: 9 additions & 0 deletions src/MovimentosManuais.Api/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
13 changes: 13 additions & 0 deletions src/MovimentosManuais.Api/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},

"ConnectionStrings": {
"DataBaseConnection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=MovimentosManuais;Integrated Security=SSPI;"
},

"AllowedHosts": "*"
}
23 changes: 23 additions & 0 deletions src/MovimentosManuais.ApplicationCore/Entity/Movimento_Manual.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace MovimentosManuais.ApplicationCore.Entity
{
public class Movimento_Manual
{
public Movimento_Manual()
{

}
public int DAT_MES { get; set; }
public int DAT_ANO { get; set; }
public int NUM_LANCAMENTO { get; set; }
public int COD_PRODUTO { get; set; }
public int COD_COSIF { get; set; }
public int DES_DESCRICAO { get; set; }
public int DAT_MOVIMENTO { get; set; }
public int COD_USUARIO { get; set; }
public int VAL_VALOR { get; set; }
}
}
19 changes: 19 additions & 0 deletions src/MovimentosManuais.ApplicationCore/Entity/Produto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace MovimentosManuais.ApplicationCore.Entity
{
public class Produto
{
public Produto()
{

}

public string COD_PRODUTO { get; set; }
public string DES_PRODUTO { get; set; }
public string STA_STATUS { get; set; }
public ICollection<Produto_Cosif> Produto_Cosifs { get; set; }
}
}
20 changes: 20 additions & 0 deletions src/MovimentosManuais.ApplicationCore/Entity/Produto_Cosif.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace MovimentosManuais.ApplicationCore.Entity
{
public class Produto_Cosif
{
public Produto_Cosif()
{

}

public string COD_PRODUTO { get; set; }
public string COD_COSIF { get; set; }
public string COD_CLASSIFICACAO { get; set; }
public string STA_STATUS { get; set; }
public ICollection<Movimento_Manual> Contatos { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace MovimentosManuais.ApplicationCore.Interfaces.Repository
{
public interface IRepository<TEntity> where TEntity : class
{
TEntity Adicionar(TEntity entity);
void Atualizar(TEntity entity);
IEnumerable<TEntity> ObterTodos();
TEntity ObterId(int Id);
IEnumerable<TEntity> Buscar(Expression<Func<TEntity, bool>> predicado);
void Remover(TEntity entity);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using MovimentosManuais.ApplicationCore.Entity;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace MovimentosManuais.ApplicationCore.Interfaces.Services
{
public interface IProdutoService
{
Produto Adicionar(Produto entity);
void Atualizar(Produto entity);
IEnumerable<Produto> ObterTodos();
Produto ObterId(int Id);
IEnumerable<Produto> Buscar(Expression<Func<Produto, bool>> predicado);
void Remover(Produto entity);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="Services\" />
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions src/MovimentosManuais.InfraStruture/Data/DbInitializer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Linq;

namespace MovimentosManuais.InfraStruture.Data
{
public class DbInitializer
{
public DbInitializer(MovimentosManuaisContext context)
{
if (context.MovimentosManuais.Any())
{
return;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore;
using MovimentosManuais.ApplicationCore.Entity;
using MovimentosManuais.InfraStruture.EntityConfig;

namespace MovimentosManuais.InfraStruture.Data
{
public class MovimentosManuaisContext : DbContext
{
public MovimentosManuaisContext(DbContextOptions<MovimentosManuaisContext> options) : base(options)
{

}

public DbSet<Produto> Produtos { get; set; }
public DbSet<Produto_Cosif> Produto_Cosifs { get; set; }
public DbSet<Movimento_Manual> MovimentosManuais { get; set; }

protected override void OnModelCreating(ModelBuilder builder)
{
//Add name tables
builder.Entity<Produto>().ToTable("PRODUTO");
builder.Entity<Produto_Cosif>().ToTable("PRODUTO_COSIF");
builder.Entity<Movimento_Manual>().ToTable("MOVIMENTO_MANUAL");

//Mapping tables ....
builder.ApplyConfiguration(new Movimento_ManualMap());
builder.ApplyConfiguration(new Produto_CosifMap());
builder.ApplyConfiguration(new ProdutoMap());
}
}
}
Loading

0 comments on commit 0c90f3c

Please sign in to comment.