Added Translation Database 🦙

This commit is contained in:
Stefan-5422
2023-01-26 16:39:54 +01:00
parent 8e24bd7c53
commit a10f892375
3 changed files with 35 additions and 0 deletions
@@ -0,0 +1,10 @@
using Elektrifikatsiya.Model;
using Microsoft.EntityFrameworkCore;
namespace Elektrifikatsiya.Database
{
public class DeviceManagmentDatabaseContext : DbContext
{
public DbSet<Device> Devices { get; set; }
}
}
@@ -21,7 +21,12 @@
<PackageReference Include="Blazorise" Version="1.1.*" /> <PackageReference Include="Blazorise" Version="1.1.*" />
<PackageReference Include="Blazorise.Material" Version="1.1.*" /> <PackageReference Include="Blazorise.Material" Version="1.1.*" />
<PackageReference Include="Blazorise.Icons.Material" Version="1.1.*" /> <PackageReference Include="Blazorise.Icons.Material" Version="1.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Model\" />
</ItemGroup>
</Project> </Project>
@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
using System.Net;
namespace Elektrifikatsiya.Model;
public class Device
{
[Key]
public string Key { get; private set; }
[Required]
public string Name { get; private set; } = string.Empty;
[Required]
public IPAddress Address { get; private set; }
public Device(string key, IPAddress address)
{
Key = key;
Address = address;
}
}