Mass rename project for rebranding

This commit is contained in:
TheXamlGuy
2024-06-09 14:00:36 +01:00
parent 1f777e19cd
commit 45712d0a70
241 changed files with 310 additions and 366 deletions
+17
View File
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Wallet.Data;
[Table("Blobs")]
public record BlobEntry
{
public byte[]? Data { get; set; }
public int Type { get; set; }
[Key]
public int Id { get; set; }
public DateTime DateTime { get; set; }
}
+23
View File
@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Wallet.Data;
[Table("Items")]
public record ItemEntry
{
[Key]
public Guid Id { get; set; }
public required string Name { get; set; }
public string? Description { get; set; }
public int State { get; set; } = 0;
public required string Category { get; set; }
public ICollection<TagEntry> Tags { get; set; } = new List<TagEntry>();
public ICollection<BlobEntry> Blobs { get; set; } = new List<BlobEntry>();
}
+24
View File
@@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
namespace Wallet.Data;
public class WalletContext(DbContextOptions<WalletContext> options) :
DbContext(options)
{
public DbSet<BlobEntry> Blobs { get; set; }
public DbSet<ItemEntry> Items { get; set; }
public DbSet<TagEntry> Tags { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<ItemEntry>()
.HasMany(x => x.Tags)
.WithOne();
modelBuilder.Entity<ItemEntry>()
.HasMany(x => x.Blobs)
.WithOne();
}
}
+13
View File
@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Wallet.Data;
[Table("Tags")]
public class TagEntry
{
[Key]
public int Id { get; set; }
public string? Name { get; set; }
}
+20
View File
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0-preview.4.24267.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0-preview.4.24267.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="9.0.0-preview.4.24267.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-preview.4.24267.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" Version="2.1.8" />
</ItemGroup>
</Project>