fronted: login
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace back.DataModels;
|
||||
|
||||
[Table("Rankings")]
|
||||
public class RankingModel
|
||||
{
|
||||
[Key]
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
|
||||
private int totalVotes;
|
||||
private int upVotes;
|
||||
private int downVotes;
|
||||
@@ -13,6 +20,13 @@ public class RankingModel
|
||||
this.downVotes = downVotes;
|
||||
}
|
||||
|
||||
public RankingModel()
|
||||
{
|
||||
totalVotes = 0;
|
||||
upVotes = 0;
|
||||
downVotes = 0;
|
||||
}
|
||||
|
||||
public void DownVote()
|
||||
{
|
||||
downVotes++;
|
||||
|
Reference in New Issue
Block a user