-
Notifications
You must be signed in to change notification settings - Fork 35
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
Showing
18 changed files
with
551 additions
and
39 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
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
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,45 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace Tzkt.Data.Models | ||
{ | ||
public class RefutationGame | ||
{ | ||
public int Id { get; set; } | ||
public int SmartRollupId { get; set; } | ||
public int InitiatorId { get; set; } | ||
public int OpponentId { get; set; } | ||
public int InitiatorCommitmentId { get; set; } | ||
public int OpponentCommitmentId { get; set; } | ||
public long LastMoveId { get; set; } | ||
|
||
public int FirstLevel { get; set; } | ||
public int LastLevel { get; set; } | ||
|
||
public long? InitiatorReward { get; set; } | ||
public long? InitiatorLoss { get; set; } | ||
public long? OpponentReward { get; set; } | ||
public long? OpponentLoss { get; set; } | ||
} | ||
|
||
public static class RefutationGameModel | ||
{ | ||
public static void BuildRefutationGameModel(this ModelBuilder modelBuilder) | ||
{ | ||
#region keys | ||
modelBuilder.Entity<RefutationGame>() | ||
.HasKey(x => x.Id); | ||
#endregion | ||
|
||
#region indexes | ||
modelBuilder.Entity<RefutationGame>() | ||
.HasIndex(x => x.SmartRollupId); | ||
|
||
modelBuilder.Entity<RefutationGame>() | ||
.HasIndex(x => x.FirstLevel); | ||
|
||
modelBuilder.Entity<RefutationGame>() | ||
.HasIndex(x => x.LastLevel); | ||
#endregion | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.