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
8 changes: 7 additions & 1 deletion APIGateway_Services/APIGateway_Services.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
Expand All @@ -10,4 +10,10 @@
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Application_Services\Application_Services.csproj" />
<ProjectReference Include="..\Domain_Services\Domain_Services.csproj" />
<ProjectReference Include="..\Infrastructure_Service\Infrastructure_Service.csproj" />
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions APIGateway_Services/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace APIGateway_Services.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class UsersController : ControllerBase
{
}
}
14 changes: 14 additions & 0 deletions Application_Services/DTO/ProjectAllocationDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Application_Services.DTO
{
public class ProjectAllocationDTO
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid ProjectId { get; set; }
public DateTime AllocatedAt { get; set; } = DateTime.UtcNow;
}
}
16 changes: 16 additions & 0 deletions Application_Services/DTO/ProjectDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Application_Services.DTO
{
public class ProjectDTO
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public Guid TeacherId { get; set; }
public string Status { get; set; } = "Open"; // Open, Closed
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}
15 changes: 15 additions & 0 deletions Application_Services/DTO/ProjectRequestDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Application_Services.DTO
{
public class ProjectRequestDTO
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid ProjectId { get; set; }
public string Status { get; set; } = "Pending"; // Pending, Approved, Rejected
public DateTime RequestedAt { get; set; } = DateTime.UtcNow;
}
}
17 changes: 17 additions & 0 deletions Application_Services/DTO/UserDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Application_Services.DTO
{
public class UserDTO
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Role { get; set; } = string.Empty; // Admin, Teacher, Student

// Only for Students
public string? Session { get; set; } // e.g. "2020-24", "2022-26"
public string? Section { get; set; } // e.g. "A", "B", "C"

public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}
10 changes: 10 additions & 0 deletions Application_Services/Interface/IUsers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Application_Services.Interface
{
internal interface IUsers
{
}
}
10 changes: 10 additions & 0 deletions Application_Services/Repostory/UserRepostory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Application_Services.Repostory
{
internal class UserRepostory
{
}
}
16 changes: 16 additions & 0 deletions Domain_Services/Model/Project.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Domain_Services.Model
{
public class Project
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public Guid TeacherId { get; set; }
public string Status { get; set; } = "Open"; // Open, Closed
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}
14 changes: 14 additions & 0 deletions Domain_Services/Model/ProjectAllocation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Domain_Services.Model
{
public class ProjectAllocation
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid ProjectId { get; set; }
public DateTime AllocatedAt { get; set; } = DateTime.UtcNow;
}
}
15 changes: 15 additions & 0 deletions Domain_Services/Model/ProjectRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Domain_Services.Model
{
public class ProjectRequest
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid ProjectId { get; set; }
public string Status { get; set; } = "Pending"; // Pending, Approved, Rejected
public DateTime RequestedAt { get; set; } = DateTime.UtcNow;
}
}
21 changes: 21 additions & 0 deletions Domain_Services/Model/User.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Domain_Services.Model
{
public class User
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Role { get; set; } = string.Empty; // Admin, Teacher, Student

// Only for Students
public string? Session { get; set; } // e.g. "2020-24", "2022-26"
public string? Section { get; set; } // e.g. "A", "B", "C"

public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}
21 changes: 21 additions & 0 deletions Infrastructure_Service/AppDbContext/ProjectAllocationDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Infrastructure_Service.AppDbContext
{
public class ProjectAllocationDbContext : DBcontext
{
public DbSet<User> Users { get; set; }
public DbSet<Project> Projects { get; set; }
public DbSet<ProjectRequest> ProjectRequests { get; set; }

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Data Source=project_allocation.db");
}



}
}
13 changes: 13 additions & 0 deletions Infrastructure_Service/Infrastructure_Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@
<Nullable>enable</Nullable>
</PropertyGroup>

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

</Project>