This commit is contained in:
Janus Knudsen 2025-03-03 17:40:16 +01:00
parent 71576a4b1f
commit 73a1f11e99
21 changed files with 236 additions and 228 deletions

View file

@ -1,5 +1,6 @@
using Insight.Database;
using PlanTempus.Core.Sql;
namespace PlanTempus.Components.Organizations.Create
{
public class CreateOrganizationHandler
@ -19,11 +20,12 @@ namespace PlanTempus.Components.Organizations.Create
var organizationId = Guid.NewGuid();
var now = DateTime.UtcNow;
var sql = @"
INSERT INTO Organizations (Id, Name, Description, CreatedById, CreatedAt, UpdatedAt)
VALUES (@Id, @Name, @Description, @CreatedById, @CreatedAt, @UpdatedAt)";
var sql = @"
INSERT INTO organizations (id, name, description, created_by_id)
VALUES (@Id, @Name, @Description, @CreatedById)";
await db.Connection.ExecuteSqlAsync(sql, new
await db.Connection.ExecuteSqlAsync(sql, new
{
Id = organizationId,
command.Name,

View file

@ -10,6 +10,9 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Users\Create\" />
<Folder Include="Users\Delete\" />
<Folder Include="Users\Update\" />
<Folder Include="Organizations\Delete\" />
<Folder Include="Organizations\Update\" />
</ItemGroup>