Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions TurboSamplePlugin.DesignTime/TurboSamplePlugin.DesignTime.csproj

This file was deleted.

14 changes: 0 additions & 14 deletions TurboSamplePlugin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ VisualStudioVersion = 17.8.34322.80
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TurboSamplePlugin", "TurboSamplePlugin\TurboSamplePlugin.csproj", "{24B90E2F-1A81-4D24-B47A-2DCAF8CA62BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TurboSamplePlugin.DesignTime", "TurboSamplePlugin.DesignTime\TurboSamplePlugin.DesignTime.csproj", "{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,18 +27,6 @@ Global
{24B90E2F-1A81-4D24-B47A-2DCAF8CA62BF}.Release|x64.Build.0 = Release|Any CPU
{24B90E2F-1A81-4D24-B47A-2DCAF8CA62BF}.Release|x86.ActiveCfg = Release|Any CPU
{24B90E2F-1A81-4D24-B47A-2DCAF8CA62BF}.Release|x86.Build.0 = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|x64.ActiveCfg = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|x64.Build.0 = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|x86.ActiveCfg = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Debug|x86.Build.0 = Debug|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|Any CPU.Build.0 = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|x64.ActiveCfg = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|x64.Build.0 = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|x86.ActiveCfg = Release|Any CPU
{5EE7777B-A29F-4FF2-A030-1BA27FBBF17F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions TurboSamplePlugin/Database/Migrations/20260205210952_Init.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TurboSamplePlugin.Migrations
{
/// <inheritdoc />
public partial class Init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.CreateTable(
name: "tsp_sample_entities",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
created_at = table.Column<DateTime>(type: "datetime(6)", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
updated_at = table.Column<DateTime>(type: "datetime(6)", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn),
deleted_at = table.Column<DateTime>(type: "datetime(6)", nullable: true)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn)
},
constraints: table =>
{
table.PrimaryKey("PK_tsp_sample_entities", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "tsp_sample_entities");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TurboSamplePlugin.Database;

#nullable disable

namespace TurboSamplePlugin.Migrations
{
[DbContext(typeof(SampleDbContext))]
partial class SampleDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 64);

MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);

modelBuilder.Entity("TurboSamplePlugin.Database.SampleEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");

MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));

b.Property<DateTime>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("datetime(6)")
.HasColumnName("created_at");

MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<DateTime>("CreatedAt"));

b.Property<DateTime?>("DeletedAt")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)")
.HasColumnName("deleted_at");

MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime?>("DeletedAt"));

b.Property<DateTime>("UpdatedAt")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime(6)")
.HasColumnName("updated_at");

MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));

b.HasKey("Id");

b.ToTable("tsp_sample_entities");
});
#pragma warning restore 612, 618
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SampleDbContext CreateDbContext(string[] args)

services.AddSingleton(_ =>
JsonSerializer.Deserialize<PluginManifest>(
File.ReadAllText("../TurboSamplePlugin/manifest.json")
File.ReadAllText("../manifest.json")
)!
);
services.AddSingleton<TablePrefixProvider>(sp =>
Expand Down
61 changes: 26 additions & 35 deletions TurboSamplePlugin/TurboSamplePlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,40 @@
<BuildProjectReferences>false</BuildProjectReferences>
</PropertyGroup>
<ItemGroup>
<None
Include="manifest.json"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
/>
<None Include="manifest.json" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Contracts\Turbo.Contracts.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Database\Turbo.Database.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Events\Turbo.Events.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Messages\Turbo.Messages.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Primitives\Turbo.Primitives.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<ProjectReference
Include="..\..\turbo-cloud\Turbo.Crypto\Turbo.Crypto.csproj"
Private="false"
ExcludeAssets="runtime"
/>
<Reference Include="Turbo.Contracts">
<HintPath>..\..\turbo-cloud\Turbo.Contracts\bin\Debug\net9.0\Turbo.Contracts.dll</HintPath>
</Reference>
<Reference Include="Turbo.Crypto">
<HintPath>..\..\turbo-cloud\Turbo.Crypto\bin\Debug\net9.0\Turbo.Crypto.dll</HintPath>
</Reference>
<Reference Include="Turbo.Database">
<HintPath>..\..\turbo-cloud\Turbo.Database\bin\Debug\net9.0\Turbo.Database.dll</HintPath>
</Reference>
<Reference Include="Turbo.Events">
<HintPath>..\..\turbo-cloud\Turbo.Events\bin\Debug\net9.0\Turbo.Events.dll</HintPath>
</Reference>
<Reference Include="Turbo.Messages">
<HintPath>..\..\turbo-cloud\Turbo.Messages\bin\Debug\net9.0\Turbo.Messages.dll</HintPath>
</Reference>
<Reference Include="Turbo.Pipeline">
<HintPath>..\..\turbo-cloud\Turbo.Pipeline\bin\Debug\net9.0\Turbo.Pipeline.dll</HintPath>
</Reference>
<Reference Include="Turbo.Primitives">
<HintPath>..\..\turbo-cloud\Turbo.Primitives\bin\Debug\net9.0\Turbo.Primitives.dll</HintPath>
</Reference>
</ItemGroup>
</Project>