Added hopframe backend
This commit is contained in:
18
SpotiParty.Web/Models/Event.cs
Normal file
18
SpotiParty.Web/Models/Event.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace SpotiParty.Web.Models;
|
||||
|
||||
public class Event {
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; init; }
|
||||
|
||||
public required User Host { get; init; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public required string Name { get; set; }
|
||||
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
public DateTime End { get; set; }
|
||||
}
|
||||
@@ -5,10 +5,15 @@ namespace SpotiParty.Web.Models;
|
||||
public class User {
|
||||
[Key]
|
||||
public Guid UserId { get; init; } = Guid.CreateVersion7();
|
||||
|
||||
[MaxLength(255)]
|
||||
public required string SpotifyUserId { get; init; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string DisplayName { get; init; }
|
||||
public required string DisplayName { get; init; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string RefreshToken { get; set; }
|
||||
public required string RefreshToken { get; set; }
|
||||
|
||||
public bool IsAdmin { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user