Skip to content

Latest commit

 

History

History
107 lines (85 loc) · 2.47 KB

File metadata and controls

107 lines (85 loc) · 2.47 KB

Queueomatic Planning

Aim of the project

To develop a queue system that can be used for educational purposes or for any other situations where prioritization of individuals is necessary.

NOTE

  • All Ids which goes out of the server/application has to be encoded in hashids.
  • All Ids which comes into the server/application has to be decoded in hashids.
  • Relevant tests should be written when adding new functionalities.

Database

  • SQL as the choice of Database

  • Data models

    public class User{
      [Id]
      [Email]
      public string Email { get; set; }
    
      [MaxLength(20)]
      public string NickName { get; set; }
      public byte[] PasswordHash { get; set; }
      public byte[] PasswordSalt { get; set; }
      public virtual ICollection<Room> Rooms { get; set; }
    }
    public class Room{
      public Guid Id { get; set; }
    
      [MaxLength(20)]
      public string Name { get; set; }
      public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
      public DateTime ExpireAt { get; set; } = DateTime.UtcNow.AddHours(12);
      public virtual User Owner { get; set; }
      public virtual ICollection<Participant> Participators { get; set; }
    }
    public class Paricipant{
      public Guid Id { get; set; }
    
      [MaxLength(20)]
      public string NickName { get; set; }
      public DateTime StatusDate { get; set; } = DateTime.UtcNow;
      public Status Status { get; set; } = Status.Idling;
      public virtual Room Room { get; set; }
    }
    public enum Status{
      Idling,
      Waiting,
      Ongoing,
    }

Example


🌠 Getting help
🌍 Earth


Waiting Needs help
🪐 Jupiter 🌞 Sun


Design patterns and design principles

  • Achiving clean architecture by:
  • Interface segregation principle
  • Single responsibility principle
  • Open-closed principle
  • Common closure principle
  • Dependency Inversion principle
  • REPR Design Pattern (Request-Endpoint-Response)
    • We use FastEndpoints to achive this pattern.
  • Unit of Work with Repository Pattern

LINKS