Skip to content

Backend/room model - #17

Merged
Salvarez99 merged 10 commits into
mainfrom
backend/room-model
Oct 16, 2025
Merged

Salvarez99 merged 10 commits into
mainfrom
backend/room-model

Conversation

@muhiddinkurbonov

Copy link
Copy Markdown
Collaborator

Added Room model

@github-actions

Copy link
Copy Markdown

Formatting Issues Detected!

  • Backend (Csharpier): Please run dotnet csharpier . to fix formatting.
View Csharpier output
Error ./Project.App/Project.Api/Data/MappingProfile.cs - Was not formatted.
  ----------------------------- Expected: Around Line 3 -----------------------------
  using AutoMapper;
  using Project.Api.Models;
  using Project.DTOs;
  ----------------------------- Actual: Around Line 3 -----------------------------
  using AutoMapper;
  using Project.DTOs;
  using Project.Api.Models;
  
Error ./Project.App/Project.Api/Controllers/ExampleController.cs - Was not formatted.
  ----------------------------- Expected: Around Line 3 -----------------------------
  using Microsoft.EntityFrameworkCore.Metadata;
  using Project.Api.Models;
  using Project.Api.Repositories;
  ----------------------------- Actual: Around Line 3 -----------------------------
  using Microsoft.EntityFrameworkCore.Metadata;
  using Project.DTOs;
  using Project.Api.Models;
  
Error ./Project.App/Project.Api/Data/AppDbContext.cs - Was not formatted.
  ----------------------------- Expected: Around Line 17 -----------------------------
      public DbSet<Hand> Hands { get; set; }
  
      /// <summary>
  ----------------------------- Actual: Around Line 17 -----------------------------
      public DbSet<Hand> Hands { get; set; }
  ····
  
  
Error ./Project.App/Project.Api/Models/RoomPlayer.cs - Was not formatted.
  ----------------------------- Expected: Around Line 2 -----------------------------
  namespace Project.Api.Models;
  
  using System.ComponentModel.DataAnnotations;
  ----------------------------- Actual: Around Line 2 -----------------------------
  namespace Project.Api.Models;
  using System.ComponentModel.DataAnnotations;
  using System.ComponentModel.DataAnnotations.Schema;
  
Error ./Project.App/Project.Api/Models/Room.cs - Was not formatted.
  The file did not end with a single newline.
Error ./Project.App/Project.Api/Models/User.cs - Was not formatted.
  ----------------------------- Expected: Around Line 10 -----------------------------
          [Key]
          public int Id { get; set; }
  
  ----------------------------- Actual: Around Line 10 -----------------------------
          [Key]
          public int Id {get; set;}
          [Required, MaxLength(50)]
  
Checked 16 files in 357ms.

@github-actions

Copy link
Copy Markdown

Formatting Issues Detected!

  • Backend (Csharpier): Please run dotnet csharpier . to fix formatting.
View Csharpier output
Error ./Project.App/Project.Api/Models/User.cs - Was not formatted.
  ----------------------------- Expected: Around Line 10 -----------------------------
          [Key]
          public int Id { get; set; }
  
  ----------------------------- Actual: Around Line 10 -----------------------------
          [Key]
          public int Id {get; set;}
          [Required, MaxLength(256)]
  
Error ./Project.App/Project.Api/Models/RoomPlayer.cs - Was not formatted.
  ----------------------------- Expected: Around Line 1 -----------------------------
  using System.ComponentModel.DataAnnotations;
  using System.ComponentModel.DataAnnotations.Schema;
  ----------------------------- Actual: Around Line 1 -----------------------------
  
  
  
Checked 15 files in 333ms.

@alt-potato alt-potato left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notes about GameState, plus that formatting warning. Otherwise, looks good.

Comment thread Project.App/Project.Api/Models/Room.cs Outdated
[MaxLength(50)]
public required string GameMode { get; set; }

[MaxLength(50)]

@alt-potato alt-potato Oct 15, 2025 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[MaxLength(50)]

Since GameState is a json string, 50 characters is not nearly enough. SQL Server also has a dedicated JSON column type, which would probably be better here. Might need Fluent API for that, instead of just annotations.

@github-actions

Copy link
Copy Markdown

Formatting Issues Detected!

  • Backend (Csharpier): Please run dotnet csharpier . to fix formatting.
View Csharpier output
Error ./Project.App/Project.Api/Enum/roleEnum.cs - Was not formatted.
  The file did not end with a single newline.
Error ./Project.App/Project.Api/Enum/statusEnum.cs - Was not formatted.
  The file did not end with a single newline.
Error ./Project.App/Project.Api/Models/RoomPlayer.cs - Was not formatted.
  ----------------------------- Expected: Around Line 31 -----------------------------
      public Status Status { get; set; }
  
      [Required]
  ----------------------------- Actual: Around Line 31 -----------------------------
      public Status Status { get; set; }
      [Required]
      public long Balance { get; set; }
  
Checked 18 files in 363ms.

@Salvarez99
Salvarez99 merged commit 48b9d8c into main Oct 16, 2025
1 check passed
@Salvarez99
Salvarez99 deleted the backend/room-model branch October 16, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants