-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bd8a8d
commit c839aa9
Showing
18 changed files
with
1,110 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ button:hover { | |
|
||
main { | ||
width: 1100px; | ||
margin: auto | ||
margin: auto; | ||
} | ||
|
||
@media (max-width: 1000px) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using devblog.Interfaces; | ||
using devblog.Services; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace devblog.Controllers | ||
{ | ||
[ApiController] | ||
[Route("api/[controller]")] | ||
public class NotificationController : ControllerBase | ||
{ | ||
private readonly INotificationService _notifications; | ||
|
||
public NotificationController(NotificationService notifications) | ||
{ | ||
_notifications = notifications; | ||
} | ||
|
||
public async Task Get() | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace devblog.Interfaces | ||
{ | ||
public interface INotificationService | ||
{ | ||
/// <summary> | ||
/// Creates a noticication for a new post to every user | ||
/// </summary> | ||
Task Create(int PostId); | ||
} | ||
} |
203 changes: 203 additions & 0 deletions
203
devblog/devblog/Migrations/20231111193006_noticication table.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
devblog/devblog/Migrations/20231111193006_noticication table.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace devblog.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class noticicationtable : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Notification", | ||
columns: table => new | ||
{ | ||
PostId = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||
Seen = table.Column<bool>(type: "tinyint(1)", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Notification", x => x.PostId); | ||
}) | ||
.Annotation("MySql:CharSet", "utf8mb4"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Notification"); | ||
} | ||
} | ||
} |
Oops, something went wrong.