mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
Added Translation Database 🦙
This commit is contained in:
@@ -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.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" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Model\" />
|
||||
</ItemGroup>
|
||||
|
||||
</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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user