Skip to content
Merged
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
44 changes: 0 additions & 44 deletions .github/workflows/CI.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: Evand-Frontend/package-lock.json
working-directory: Evand-Frontend

steps:
- uses: actions/checkout@v4
Expand All @@ -20,10 +20,10 @@ jobs:
with:
node-version: 20

- run: cd Evand-Frontend
- run: npm ci
- run: npm run build


backend:
name: Backend CI
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions Evand-Backend/Evand.API/Evand.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Evand.Application\Evand.Application.csproj" />
<ProjectReference Include="..\Evand.Persistence\Evand.Persistence.csproj" />
<ProjectReference Include="..\Evand.Infrastructure\Evand.Infrastructure.csproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions Evand-Backend/Evand.Application/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Evand.Application;

public class Class1
{

}
13 changes: 13 additions & 0 deletions Evand-Backend/Evand.Application/Evand.Application.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\Evand.Domain\Evand.Domain.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
14 changes: 14 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/Base/BaseEntity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Evand.Domain.Entities.Base
{
public class BaseEntity
{
public int Id { get; set; }
public Guid Guid { get; set; } = Guid.NewGuid();
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}
31 changes: 31 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/Event.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Evand.Domain.Entities.Base;

namespace Evand.Domain.Entities
{
public class Event : BaseEntity
{
public string Name { get; set; } = null!;
public string Category { get; set; } = null!;
public double? X { get; set; }
public double? Y { get; set; }
public decimal Price { get; set; }
public string? Photo { get; set; }
public string Address { get; set; } = null!;
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public int Capacity { get; set; }

public int OrganizerId { get; set; }
public User Organizer { get; set; } = null!;

public DateTime OrganizedDate { get; set; }

public ICollection<EventParticipant> Participants { get; set; } = new List<EventParticipant>();
public ICollection<EventLike> Likes { get; set; } = new List<EventLike>();
public ICollection<EventComment> Comments { get; set; } = new List<EventComment>();
}
}
21 changes: 21 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/EventComment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Evand.Domain.Entities.Base;

namespace Evand.Domain.Entities
{
public class EventComment : BaseEntity
{
public string Text { get; set; } = null!;

public int UserId { get; set; }
public User User { get; set; } = null!;

public int EventId { get; set; }
public Event Event { get; set; } = null!;

public DateTime CommentedAt { get; set; }
}
}
18 changes: 18 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/EventLike.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Evand.Domain.Entities
{
public class EventLike
{
public int UserId { get; set; }
public User User { get; set; } = null!;

public int EventId { get; set; }
public Event Event { get; set; } = null!;

public DateTime LikedAt { get; set; }
}
}
19 changes: 19 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/EventParticipant.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Evand.Domain.Entities.Base;

namespace Evand.Domain.Entities
{
public class EventParticipant : BaseEntity
{
public int UserId { get; set; }
public User User { get; set; } = null!;

public int EventId { get; set; }
public Event Event { get; set; } = null!;

public DateTime ParticipatedAt { get; set; }
}
}
26 changes: 26 additions & 0 deletions Evand-Backend/Evand.Domain/Entities/User.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Evand.Domain.Entities.Base;

namespace Evand.Domain.Entities
{
public class User : BaseEntity
{
public string FullName { get; set; } = null!;
public string Email { get; set; } = null!;
public string HashPassword { get; set; } = null!;
public string? PhoneNumber { get; set; }

public string? City { get; set; }

public string? Province { get; set; }
public string? Avatar { get; set; }

public ICollection<EventParticipant> ParticipatedEvents { get; set; } = new List<EventParticipant>();
public ICollection<EventLike> LikedEvents { get; set; } = new List<EventLike>();
public ICollection<EventComment> Comments { get; set; } = new List<EventComment>();
}
}
9 changes: 9 additions & 0 deletions Evand-Backend/Evand.Domain/Evand.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
6 changes: 6 additions & 0 deletions Evand-Backend/Evand.Infrastructure/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Evand.Infrastructure;

public class Class1
{

}
19 changes: 19 additions & 0 deletions Evand-Backend/Evand.Infrastructure/Evand.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\Evand.Application\Evand.Application.csproj" />
<ProjectReference Include="..\Evand.Domain\Evand.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.1" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
6 changes: 6 additions & 0 deletions Evand-Backend/Evand.Persistence/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Evand.Persistence;

public class Class1
{

}
22 changes: 22 additions & 0 deletions Evand-Backend/Evand.Persistence/DbContextes/EvandDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Evand.Domain.Entities;
using Microsoft.EntityFrameworkCore;

namespace Evand.Persistence.DbContextes
{
public class EvandDbContext(DbContextOptions<EvandDbContext> options) : DbContext(options)
{

// ===== DbSets =====
public DbSet<User> Users => Set<User>();
public DbSet<Event> Events => Set<Event>();

public DbSet<EventParticipant> EventParticipants => Set<EventParticipant>();
public DbSet<EventLike> EventLikes => Set<EventLike>();
public DbSet<EventComment> EventComments => Set<EventComment>();

}
}
23 changes: 23 additions & 0 deletions Evand-Backend/Evand.Persistence/Evand.Persistence.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\Evand.Application\Evand.Application.csproj" />
<ProjectReference Include="..\Evand.Domain\Evand.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Loading