Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion bloc/types/bloctypes.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ import Ledgertypes "ledgertypes";
// import Principal

module {
// New structs from Rust
public type PayoutDistribution = {
winner : Nat;
creator : Nat;
platform : Nat;
};

public type TournamentMeta = {
start_time : Text;
end_time : Text;
prize_pool : Nat;
winning_prize : Nat;
stream_url : ?Text;
description : Text;
tournament_banner : ?Text;
tags : [Text];
};

public type TeamType = { #Duo; #Squad; #Solo };

public type Team = {
id : Text;
name : Text;
members : [Principal];
captain : Principal;
created_at : Text;
metadata : ?Text;
};

public type UserMode = { #Base; #Creator; #Moderator };

public type OperationResult = { #Ok : Text; #Err : Text };

public type UserTrack = {
user : Principal;
Expand Down Expand Up @@ -96,6 +128,9 @@ module {
losses : ?Nat8;
points : ?[(Text, Text, Point)];
principal_id : Text;
tournaments : ?[Text];
usermode : ?UserMode;
earnings : ?Nat;
role : ?Role;
squad_badge : Text;
status : Status;
Expand All @@ -104,6 +139,7 @@ module {
wins : Nat8;
referral_id : ?Text
};


public type Point = {
position_points : Nat;
Expand All @@ -126,6 +162,9 @@ module {
captain : Text;
status : SquadType;
name : Text;
created_at : ?Text;
created_by : ?Principal;
participating_members : ParticipatingMember;
wins : ?Nat8;
losses : ?Nat8;
attendance : ?Nat8;
Expand All @@ -142,6 +181,11 @@ module {
losses : Nat8;
};

public type ParticipatingMember = {
tournament_id: Text;
members : [Member];
};

public type Role = {
#Player;
#Mod;
Expand Down Expand Up @@ -185,6 +229,18 @@ module {
tournament_rules : Text;
tournament_type : TournamentType;
// mods : [Text];
creator_principal : ?Principal;
is_private : ?Bool;
moderators : ?[Principal];
payout_distribution : ?PayoutDistribution;
external_link : ?Text;
metadata : ?TournamentMeta;
is_team_based : ?Bool;
team_size : ?TeamType;
teams : ?[Team];
allow_solo_players : ?Bool;
allow_auto_match : ?Bool;
referral_ids : ?[Text];
game : Text;
squad : [Squad];
squad_points : ?[(Text, Text, Point)];
Expand Down Expand Up @@ -263,7 +319,13 @@ module {
no_of_winners : ?Nat8;
no_of_participants : Nat;
game_type : GameType;
name : ?Text
name : ?Text;
creators_principal : ?Principal;
is_private : ?Bool;
moderators : ?[Principal];
payout_distribution : ?PayoutDistribution;
external_link : ?Text;
metadata : ?TournamentMeta;
};

public type LobbyStatus = {
Expand Down
160 changes: 0 additions & 160 deletions build.sh

This file was deleted.

21 changes: 16 additions & 5 deletions game_bloc_backend/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading