





















const db = require('../models');
const Users = db.users;






const Organizations = db.organizations;

const Clubs = db.clubs;

const ClubMemberships = db.club_memberships;

const Players = db.players;

const SeedVotes = db.seed_votes;

const Venues = db.venues;

const Leagues = db.leagues;

const LeagueTeams = db.league_teams;

const LeagueTeamPlayers = db.league_team_players;

const Games = db.games;

const GameRsvps = db.game_rsvps;

const GameGuests = db.game_guests;

const GameTeams = db.game_teams;

const GameTeamAssignments = db.game_team_assignments;

const GameAttendances = db.game_attendances;

const GamePlayerStats = db.game_player_stats;

const GamePayments = db.game_payments;

const LeaguePayments = db.league_payments;

const LeagueStandings = db.league_standings;

const LeagueFinishAwards = db.league_finish_awards;

const Notifications = db.notifications;

const AuditEvents = db.audit_events;







const OrganizationsData = [
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
    },
    
];



const ClubsData = [
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "slug": "Marie Curie",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "default_language": "vi",
            
        
    
        
        
            
                "default_target_headcount": 3,
            
        
    
        
        
            
                "payment_reminder_days": 7,
            
        
    
        
        
            
                "inactive_nudge_last_games": 1,
            
        
    
        
        
            
                "messenger_group_thread": "Alan Turing",
            
        
    
        
        
            
                "messenger_access_token": "Alan Turing",
            
        
    
        
        
            
                "stripe_account_reference": "Marie Curie",
            
        
    
        
        
            
                "stripe_connected": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "slug": "Marie Curie",
            
        
    
        
        
            
                "city": "Grace Hopper",
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "default_language": "vi",
            
        
    
        
        
            
                "default_target_headcount": 7,
            
        
    
        
        
            
                "payment_reminder_days": 3,
            
        
    
        
        
            
                "inactive_nudge_last_games": 8,
            
        
    
        
        
            
                "messenger_group_thread": "Ada Lovelace",
            
        
    
        
        
            
                "messenger_access_token": "Alan Turing",
            
        
    
        
        
            
                "stripe_account_reference": "Grace Hopper",
            
        
    
        
        
            
                "stripe_connected": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "slug": "Alan Turing",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "default_language": "vi",
            
        
    
        
        
            
                "default_target_headcount": 5,
            
        
    
        
        
            
                "payment_reminder_days": 3,
            
        
    
        
        
            
                "inactive_nudge_last_games": 9,
            
        
    
        
        
            
                "messenger_group_thread": "Marie Curie",
            
        
    
        
        
            
                "messenger_access_token": "Ada Lovelace",
            
        
    
        
        
            
                "stripe_account_reference": "Ada Lovelace",
            
        
    
        
        
            
                "stripe_connected": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "slug": "Ada Lovelace",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "country": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "default_language": "en",
            
        
    
        
        
            
                "default_target_headcount": 2,
            
        
    
        
        
            
                "payment_reminder_days": 4,
            
        
    
        
        
            
                "inactive_nudge_last_games": 9,
            
        
    
        
        
            
                "messenger_group_thread": "Marie Curie",
            
        
    
        
        
            
                "messenger_access_token": "Alan Turing",
            
        
    
        
        
            
                "stripe_account_reference": "Ada Lovelace",
            
        
    
        
        
            
                "stripe_connected": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ClubMembershipsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "club_role": "member",
            
        
    
        
        
            
                "member_code": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "member_since_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "club_role": "manager",
            
        
    
        
        
            
                "member_code": "Grace Hopper",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                "member_since_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "club_role": "member",
            
        
    
        
        
            
                "member_code": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "member_since_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "club_role": "member",
            
        
    
        
        
            
                "member_code": "Ada Lovelace",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                "member_since_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PlayersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "seed_tier": "tier_2_pro",
            
        
    
        
        
            
                "preferred_positions": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "seed_tier": "tier_3_elite",
            
        
    
        
        
            
                "preferred_positions": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "seed_tier": "tier_1_legend",
            
        
    
        
        
            
                "preferred_positions": "Alan Turing",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "display_name": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "seed_tier": "tier_2_pro",
            
        
    
        
        
            
                "preferred_positions": "Marie Curie",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SeedVotesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "direction": "up",
            
        
    
        
        
            
                "voted_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "direction": "up",
            
        
    
        
        
            
                "voted_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "direction": "down",
            
        
    
        
        
            
                "voted_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "direction": "up",
            
        
    
        
        
            
                "voted_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const VenuesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "map_url": "Ada Lovelace",
            
        
    
        
        
            
                "default_field_cost": 1.78,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "address": "Alan Turing",
            
        
    
        
        
            
                "map_url": "Marie Curie",
            
        
    
        
        
            
                "default_field_cost": 7.03,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "map_url": "Alan Turing",
            
        
    
        
        
            
                "default_field_cost": 3.73,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "map_url": "Alan Turing",
            
        
    
        
        
            
                "default_field_cost": 7.75,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeaguesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "season_label": "Marie Curie",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "upcoming",
            
        
    
        
        
            
                "rosters_locked": true,
            
        
    
        
        
            
                "registration_fee": 8.0,
            
        
    
        
        
            
                "rules_notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "season_label": "Grace Hopper",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "upcoming",
            
        
    
        
        
            
                "rosters_locked": false,
            
        
    
        
        
            
                "registration_fee": 0.88,
            
        
    
        
        
            
                "rules_notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "season_label": "Ada Lovelace",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "rosters_locked": false,
            
        
    
        
        
            
                "registration_fee": 3.46,
            
        
    
        
        
            
                "rules_notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "season_label": "Grace Hopper",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "rosters_locked": false,
            
        
    
        
        
            
                "registration_fee": 7.91,
            
        
    
        
        
            
                "rules_notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeagueTeamsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "color_label": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "color_label": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "color_label": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "color_label": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeagueTeamPlayersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GamesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "game_type": "league",
            
        
    
        
        
            
                "status": "upcoming",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "target_headcount": 8,
            
        
    
        
        
            
                "team_count": 2,
            
        
    
        
        
            
                "field_cost": 1.74,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "messenger_broadcast_sent": false,
            
        
    
        
        
            
                "finalized_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "game_type": "pickup",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "target_headcount": 1,
            
        
    
        
        
            
                "team_count": 5,
            
        
    
        
        
            
                "field_cost": 3.12,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                "messenger_broadcast_sent": false,
            
        
    
        
        
            
                "finalized_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "game_type": "league",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "target_headcount": 3,
            
        
    
        
        
            
                "team_count": 4,
            
        
    
        
        
            
                "field_cost": 2.27,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                "messenger_broadcast_sent": true,
            
        
    
        
        
            
                "finalized_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "game_type": "league",
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "target_headcount": 1,
            
        
    
        
        
            
                "team_count": 7,
            
        
    
        
        
            
                "field_cost": 4.04,
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                "messenger_broadcast_sent": true,
            
        
    
        
        
            
                "finalized_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GameRsvpsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rsvp_status": "no_response",
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rsvp_status": "going",
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rsvp_status": "no_response",
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rsvp_status": "no_response",
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GameGuestsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "nickname": "Alan Turing",
            
        
    
        
        
            
                "rsvp_status": "not_going",
            
        
    
        
        
            
                "attendance_status": "attended",
            
        
    
        
        
            
                "payment_status": "exempt",
            
        
    
        
        
            
                "seed_tier_for_balance": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "nickname": "Ada Lovelace",
            
        
    
        
        
            
                "rsvp_status": "going",
            
        
    
        
        
            
                "attendance_status": "no_fee",
            
        
    
        
        
            
                "payment_status": "unpaid",
            
        
    
        
        
            
                "seed_tier_for_balance": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "nickname": "Grace Hopper",
            
        
    
        
        
            
                "rsvp_status": "going",
            
        
    
        
        
            
                "attendance_status": "no_fee",
            
        
    
        
        
            
                "payment_status": "paid",
            
        
    
        
        
            
                "seed_tier_for_balance": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "nickname": "Marie Curie",
            
        
    
        
        
            
                "rsvp_status": "maybe",
            
        
    
        
        
            
                "attendance_status": "no_fee",
            
        
    
        
        
            
                "payment_status": "paid",
            
        
    
        
        
            
                "seed_tier_for_balance": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GameTeamsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color_label": "Alan Turing",
            
        
    
        
        
            
                "sort_order": 8,
            
        
    
        
        
            
                "final_score": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "color_label": "Alan Turing",
            
        
    
        
        
            
                "sort_order": 8,
            
        
    
        
        
            
                "final_score": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color_label": "Ada Lovelace",
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                "final_score": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "color_label": "Alan Turing",
            
        
    
        
        
            
                "sort_order": 8,
            
        
    
        
        
            
                "final_score": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GameTeamAssignmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "seed_score_snapshot": 1,
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "seed_score_snapshot": 2,
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "seed_score_snapshot": 9,
            
        
    
        
        
            
                "sort_order": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "seed_score_snapshot": 1,
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GameAttendancesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "attendance_status": "attended",
            
        
    
        
        
            
                "recorded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "attendance_status": "absent",
            
        
    
        
        
            
                "recorded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "attendance_status": "no_fee",
            
        
    
        
        
            
                "recorded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "attendance_status": "absent",
            
        
    
        
        
            
                "recorded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GamePlayerStatsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "goals": 2,
            
        
    
        
        
            
                "assists": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "goals": 4,
            
        
    
        
        
            
                "assists": 8,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "goals": 5,
            
        
    
        
        
            
                "assists": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "goals": 6,
            
        
    
        
        
            
                "assists": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GamePaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 6.39,
            
        
    
        
        
            
                "payment_status": "exempt",
            
        
    
        
        
            
                "payment_method": "stripe",
            
        
    
        
        
            
                "stripe_payment_reference": "Marie Curie",
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 2.49,
            
        
    
        
        
            
                "payment_status": "paid",
            
        
    
        
        
            
                "payment_method": "stripe",
            
        
    
        
        
            
                "stripe_payment_reference": "Grace Hopper",
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 9.39,
            
        
    
        
        
            
                "payment_status": "unpaid",
            
        
    
        
        
            
                "payment_method": "cash",
            
        
    
        
        
            
                "stripe_payment_reference": "Alan Turing",
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 5.33,
            
        
    
        
        
            
                "payment_status": "paid",
            
        
    
        
        
            
                "payment_method": "exempt",
            
        
    
        
        
            
                "stripe_payment_reference": "Ada Lovelace",
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeaguePaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 3.56,
            
        
    
        
        
            
                "amount_paid": 0.46,
            
        
    
        
        
            
                "payment_status": "paid",
            
        
    
        
        
            
                "last_paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 6.45,
            
        
    
        
        
            
                "amount_paid": 0.97,
            
        
    
        
        
            
                "payment_status": "exempt",
            
        
    
        
        
            
                "last_paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 9.31,
            
        
    
        
        
            
                "amount_paid": 6.82,
            
        
    
        
        
            
                "payment_status": "partial",
            
        
    
        
        
            
                "last_paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fee_amount": 6.37,
            
        
    
        
        
            
                "amount_paid": 6.47,
            
        
    
        
        
            
                "payment_status": "partial",
            
        
    
        
        
            
                "last_paid_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeagueStandingsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "played": 8,
            
        
    
        
        
            
                "wins": 4,
            
        
    
        
        
            
                "draws": 6,
            
        
    
        
        
            
                "losses": 9,
            
        
    
        
        
            
                "goals_for": 7,
            
        
    
        
        
            
                "goals_against": 9,
            
        
    
        
        
            
                "goal_difference": 4,
            
        
    
        
        
            
                "points": 8,
            
        
    
        
        
            
                "rank": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "played": 2,
            
        
    
        
        
            
                "wins": 1,
            
        
    
        
        
            
                "draws": 7,
            
        
    
        
        
            
                "losses": 9,
            
        
    
        
        
            
                "goals_for": 8,
            
        
    
        
        
            
                "goals_against": 1,
            
        
    
        
        
            
                "goal_difference": 3,
            
        
    
        
        
            
                "points": 2,
            
        
    
        
        
            
                "rank": 8,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "played": 6,
            
        
    
        
        
            
                "wins": 7,
            
        
    
        
        
            
                "draws": 1,
            
        
    
        
        
            
                "losses": 3,
            
        
    
        
        
            
                "goals_for": 7,
            
        
    
        
        
            
                "goals_against": 7,
            
        
    
        
        
            
                "goal_difference": 3,
            
        
    
        
        
            
                "points": 5,
            
        
    
        
        
            
                "rank": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "played": 7,
            
        
    
        
        
            
                "wins": 8,
            
        
    
        
        
            
                "draws": 4,
            
        
    
        
        
            
                "losses": 6,
            
        
    
        
        
            
                "goals_for": 6,
            
        
    
        
        
            
                "goals_against": 3,
            
        
    
        
        
            
                "goal_difference": 7,
            
        
    
        
        
            
                "points": 1,
            
        
    
        
        
            
                "rank": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeagueFinishAwardsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "finish_rank": 6,
            
        
    
        
        
            
                "bonus_points": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "finish_rank": 2,
            
        
    
        
        
            
                "bonus_points": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "finish_rank": 4,
            
        
    
        
        
            
                "bonus_points": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "finish_rank": 6,
            
        
    
        
        
            
                "bonus_points": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const NotificationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "payments",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "message": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Alan Turing",
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "seed_changes",
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "message": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Alan Turing",
            
        
    
        
        
            
                "is_read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "leagues",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "message": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Ada Lovelace",
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "leagues",
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "message": "Alan Turing",
            
        
    
        
        
            
                "deep_link": "Ada Lovelace",
            
        
    
        
        
            
                "is_read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AuditEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "Marie Curie",
            
        
    
        
        
            
                "entity_name": "Grace Hopper",
            
        
    
        
        
            
                "entity_reference": "Alan Turing",
            
        
    
        
        
            
                "details": "Grace Hopper",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "Alan Turing",
            
        
    
        
        
            
                "entity_name": "Alan Turing",
            
        
    
        
        
            
                "entity_reference": "Alan Turing",
            
        
    
        
        
            
                "details": "Ada Lovelace",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "Ada Lovelace",
            
        
    
        
        
            
                "entity_name": "Alan Turing",
            
        
    
        
        
            
                "entity_reference": "Grace Hopper",
            
        
    
        
        
            
                "details": "Ada Lovelace",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "Ada Lovelace",
            
        
    
        
        
            
                "entity_name": "Grace Hopper",
            
        
    
        
        
            
                "entity_reference": "Marie Curie",
            
        
    
        
        
            
                "details": "Alan Turing",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateUserWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User0 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (User0?.setOrganization)
                {
                    await
                    User0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User1 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (User1?.setOrganization)
                {
                    await
                    User1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User2 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (User2?.setOrganization)
                {
                    await
                    User2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User3 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (User3?.setOrganization)
                {
                    await
                    User3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
    
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateClubWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Club0 = await Clubs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Club0?.setOrganization)
                {
                    await
                    Club0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Club1 = await Clubs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Club1?.setOrganization)
                {
                    await
                    Club1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Club2 = await Clubs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Club2?.setOrganization)
                {
                    await
                    Club2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Club3 = await Clubs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Club3?.setOrganization)
                {
                    await
                    Club3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateClubMembershipWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const ClubMembership0 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ClubMembership0?.setClub)
                {
                    await
                    ClubMembership0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const ClubMembership1 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ClubMembership1?.setClub)
                {
                    await
                    ClubMembership1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const ClubMembership2 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ClubMembership2?.setClub)
                {
                    await
                    ClubMembership2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const ClubMembership3 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ClubMembership3?.setClub)
                {
                    await
                    ClubMembership3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
            
            async function associateClubMembershipWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ClubMembership0 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ClubMembership0?.setUser)
                {
                    await
                    ClubMembership0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ClubMembership1 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ClubMembership1?.setUser)
                {
                    await
                    ClubMembership1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ClubMembership2 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ClubMembership2?.setUser)
                {
                    await
                    ClubMembership2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ClubMembership3 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ClubMembership3?.setUser)
                {
                    await
                    ClubMembership3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateClubMembershipWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ClubMembership0 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ClubMembership0?.setOrganization)
                {
                    await
                    ClubMembership0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ClubMembership1 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ClubMembership1?.setOrganization)
                {
                    await
                    ClubMembership1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ClubMembership2 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ClubMembership2?.setOrganization)
                {
                    await
                    ClubMembership2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ClubMembership3 = await ClubMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ClubMembership3?.setOrganization)
                {
                    await
                    ClubMembership3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePlayerWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Player0 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Player0?.setClub)
                {
                    await
                    Player0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Player1 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Player1?.setClub)
                {
                    await
                    Player1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Player2 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Player2?.setClub)
                {
                    await
                    Player2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Player3 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Player3?.setClub)
                {
                    await
                    Player3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
            
            async function associatePlayerWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Player0 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Player0?.setUser)
                {
                    await
                    Player0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Player1 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Player1?.setUser)
                {
                    await
                    Player1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Player2 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Player2?.setUser)
                {
                    await
                    Player2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Player3 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Player3?.setUser)
                {
                    await
                    Player3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePlayerWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Player0 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Player0?.setOrganization)
                {
                    await
                    Player0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Player1 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Player1?.setOrganization)
                {
                    await
                    Player1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Player2 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Player2?.setOrganization)
                {
                    await
                    Player2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Player3 = await Players.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Player3?.setOrganization)
                {
                    await
                    Player3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSeedVoteWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const SeedVote0 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeedVote0?.setClub)
                {
                    await
                    SeedVote0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const SeedVote1 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeedVote1?.setClub)
                {
                    await
                    SeedVote1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const SeedVote2 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeedVote2?.setClub)
                {
                    await
                    SeedVote2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const SeedVote3 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SeedVote3?.setClub)
                {
                    await
                    SeedVote3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
            
            async function associateSeedVoteWithVoter_user() {
            
                const relatedVoter_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SeedVote0 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeedVote0?.setVoter_user)
                {
                    await
                    SeedVote0.
                    setVoter_user(relatedVoter_user0);
                }
            
                const relatedVoter_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SeedVote1 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeedVote1?.setVoter_user)
                {
                    await
                    SeedVote1.
                    setVoter_user(relatedVoter_user1);
                }
            
                const relatedVoter_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SeedVote2 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeedVote2?.setVoter_user)
                {
                    await
                    SeedVote2.
                    setVoter_user(relatedVoter_user2);
                }
            
                const relatedVoter_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SeedVote3 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SeedVote3?.setVoter_user)
                {
                    await
                    SeedVote3.
                    setVoter_user(relatedVoter_user3);
                }
            
        }
        
    
        
            
            async function associateSeedVoteWithTarget_player() {
            
                const relatedTarget_player0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const SeedVote0 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeedVote0?.setTarget_player)
                {
                    await
                    SeedVote0.
                    setTarget_player(relatedTarget_player0);
                }
            
                const relatedTarget_player1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const SeedVote1 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeedVote1?.setTarget_player)
                {
                    await
                    SeedVote1.
                    setTarget_player(relatedTarget_player1);
                }
            
                const relatedTarget_player2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const SeedVote2 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeedVote2?.setTarget_player)
                {
                    await
                    SeedVote2.
                    setTarget_player(relatedTarget_player2);
                }
            
                const relatedTarget_player3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const SeedVote3 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SeedVote3?.setTarget_player)
                {
                    await
                    SeedVote3.
                    setTarget_player(relatedTarget_player3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateSeedVoteWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeedVote0 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeedVote0?.setOrganization)
                {
                    await
                    SeedVote0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeedVote1 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeedVote1?.setOrganization)
                {
                    await
                    SeedVote1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeedVote2 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeedVote2?.setOrganization)
                {
                    await
                    SeedVote2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeedVote3 = await SeedVotes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SeedVote3?.setOrganization)
                {
                    await
                    SeedVote3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateVenueWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Venue0 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Venue0?.setClub)
                {
                    await
                    Venue0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Venue1 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Venue1?.setClub)
                {
                    await
                    Venue1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Venue2 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Venue2?.setClub)
                {
                    await
                    Venue2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Venue3 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Venue3?.setClub)
                {
                    await
                    Venue3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateVenueWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Venue0 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Venue0?.setOrganization)
                {
                    await
                    Venue0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Venue1 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Venue1?.setOrganization)
                {
                    await
                    Venue1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Venue2 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Venue2?.setOrganization)
                {
                    await
                    Venue2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Venue3 = await Venues.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Venue3?.setOrganization)
                {
                    await
                    Venue3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeagueWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const League0 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (League0?.setClub)
                {
                    await
                    League0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const League1 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (League1?.setClub)
                {
                    await
                    League1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const League2 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (League2?.setClub)
                {
                    await
                    League2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const League3 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (League3?.setClub)
                {
                    await
                    League3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLeagueWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const League0 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (League0?.setOrganization)
                {
                    await
                    League0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const League1 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (League1?.setOrganization)
                {
                    await
                    League1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const League2 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (League2?.setOrganization)
                {
                    await
                    League2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const League3 = await Leagues.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (League3?.setOrganization)
                {
                    await
                    League3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeagueTeamWithLeague() {
            
                const relatedLeague0 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueTeam0 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueTeam0?.setLeague)
                {
                    await
                    LeagueTeam0.
                    setLeague(relatedLeague0);
                }
            
                const relatedLeague1 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueTeam1 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueTeam1?.setLeague)
                {
                    await
                    LeagueTeam1.
                    setLeague(relatedLeague1);
                }
            
                const relatedLeague2 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueTeam2 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueTeam2?.setLeague)
                {
                    await
                    LeagueTeam2.
                    setLeague(relatedLeague2);
                }
            
                const relatedLeague3 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueTeam3 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueTeam3?.setLeague)
                {
                    await
                    LeagueTeam3.
                    setLeague(relatedLeague3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateLeagueTeamWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeam0 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueTeam0?.setOrganization)
                {
                    await
                    LeagueTeam0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeam1 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueTeam1?.setOrganization)
                {
                    await
                    LeagueTeam1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeam2 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueTeam2?.setOrganization)
                {
                    await
                    LeagueTeam2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeam3 = await LeagueTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueTeam3?.setOrganization)
                {
                    await
                    LeagueTeam3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeagueTeamPlayerWithLeague_team() {
            
                const relatedLeague_team0 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueTeamPlayer0 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueTeamPlayer0?.setLeague_team)
                {
                    await
                    LeagueTeamPlayer0.
                    setLeague_team(relatedLeague_team0);
                }
            
                const relatedLeague_team1 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueTeamPlayer1 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueTeamPlayer1?.setLeague_team)
                {
                    await
                    LeagueTeamPlayer1.
                    setLeague_team(relatedLeague_team1);
                }
            
                const relatedLeague_team2 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueTeamPlayer2 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueTeamPlayer2?.setLeague_team)
                {
                    await
                    LeagueTeamPlayer2.
                    setLeague_team(relatedLeague_team2);
                }
            
                const relatedLeague_team3 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueTeamPlayer3 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueTeamPlayer3?.setLeague_team)
                {
                    await
                    LeagueTeamPlayer3.
                    setLeague_team(relatedLeague_team3);
                }
            
        }
        
    
        
            
            async function associateLeagueTeamPlayerWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueTeamPlayer0 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueTeamPlayer0?.setPlayer)
                {
                    await
                    LeagueTeamPlayer0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueTeamPlayer1 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueTeamPlayer1?.setPlayer)
                {
                    await
                    LeagueTeamPlayer1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueTeamPlayer2 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueTeamPlayer2?.setPlayer)
                {
                    await
                    LeagueTeamPlayer2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueTeamPlayer3 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueTeamPlayer3?.setPlayer)
                {
                    await
                    LeagueTeamPlayer3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
    
        
            
            async function associateLeagueTeamPlayerWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeamPlayer0 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueTeamPlayer0?.setOrganization)
                {
                    await
                    LeagueTeamPlayer0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeamPlayer1 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueTeamPlayer1?.setOrganization)
                {
                    await
                    LeagueTeamPlayer1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeamPlayer2 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueTeamPlayer2?.setOrganization)
                {
                    await
                    LeagueTeamPlayer2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueTeamPlayer3 = await LeagueTeamPlayers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueTeamPlayer3?.setOrganization)
                {
                    await
                    LeagueTeamPlayer3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Game0 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Game0?.setClub)
                {
                    await
                    Game0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Game1 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Game1?.setClub)
                {
                    await
                    Game1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Game2 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Game2?.setClub)
                {
                    await
                    Game2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Game3 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Game3?.setClub)
                {
                    await
                    Game3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
            
            async function associateGameWithLeague() {
            
                const relatedLeague0 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const Game0 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Game0?.setLeague)
                {
                    await
                    Game0.
                    setLeague(relatedLeague0);
                }
            
                const relatedLeague1 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const Game1 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Game1?.setLeague)
                {
                    await
                    Game1.
                    setLeague(relatedLeague1);
                }
            
                const relatedLeague2 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const Game2 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Game2?.setLeague)
                {
                    await
                    Game2.
                    setLeague(relatedLeague2);
                }
            
                const relatedLeague3 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const Game3 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Game3?.setLeague)
                {
                    await
                    Game3.
                    setLeague(relatedLeague3);
                }
            
        }
        
    
        
            
            async function associateGameWithVenue() {
            
                const relatedVenue0 = await Venues.findOne({
                    offset: Math.floor(Math.random() * (await Venues.count())),
                });
                const Game0 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Game0?.setVenue)
                {
                    await
                    Game0.
                    setVenue(relatedVenue0);
                }
            
                const relatedVenue1 = await Venues.findOne({
                    offset: Math.floor(Math.random() * (await Venues.count())),
                });
                const Game1 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Game1?.setVenue)
                {
                    await
                    Game1.
                    setVenue(relatedVenue1);
                }
            
                const relatedVenue2 = await Venues.findOne({
                    offset: Math.floor(Math.random() * (await Venues.count())),
                });
                const Game2 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Game2?.setVenue)
                {
                    await
                    Game2.
                    setVenue(relatedVenue2);
                }
            
                const relatedVenue3 = await Venues.findOne({
                    offset: Math.floor(Math.random() * (await Venues.count())),
                });
                const Game3 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Game3?.setVenue)
                {
                    await
                    Game3.
                    setVenue(relatedVenue3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGameWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Game0 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Game0?.setOrganization)
                {
                    await
                    Game0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Game1 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Game1?.setOrganization)
                {
                    await
                    Game1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Game2 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Game2?.setOrganization)
                {
                    await
                    Game2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Game3 = await Games.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Game3?.setOrganization)
                {
                    await
                    Game3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameRsvpWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameRsvp0 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameRsvp0?.setGame)
                {
                    await
                    GameRsvp0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameRsvp1 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameRsvp1?.setGame)
                {
                    await
                    GameRsvp1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameRsvp2 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameRsvp2?.setGame)
                {
                    await
                    GameRsvp2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameRsvp3 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameRsvp3?.setGame)
                {
                    await
                    GameRsvp3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
            
            async function associateGameRsvpWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameRsvp0 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameRsvp0?.setPlayer)
                {
                    await
                    GameRsvp0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameRsvp1 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameRsvp1?.setPlayer)
                {
                    await
                    GameRsvp1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameRsvp2 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameRsvp2?.setPlayer)
                {
                    await
                    GameRsvp2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameRsvp3 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameRsvp3?.setPlayer)
                {
                    await
                    GameRsvp3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateGameRsvpWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameRsvp0 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameRsvp0?.setOrganization)
                {
                    await
                    GameRsvp0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameRsvp1 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameRsvp1?.setOrganization)
                {
                    await
                    GameRsvp1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameRsvp2 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameRsvp2?.setOrganization)
                {
                    await
                    GameRsvp2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameRsvp3 = await GameRsvps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameRsvp3?.setOrganization)
                {
                    await
                    GameRsvp3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameGuestWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameGuest0 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameGuest0?.setGame)
                {
                    await
                    GameGuest0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameGuest1 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameGuest1?.setGame)
                {
                    await
                    GameGuest1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameGuest2 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameGuest2?.setGame)
                {
                    await
                    GameGuest2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameGuest3 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameGuest3?.setGame)
                {
                    await
                    GameGuest3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
            
            async function associateGameGuestWithAdded_by_user() {
            
                const relatedAdded_by_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GameGuest0 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameGuest0?.setAdded_by_user)
                {
                    await
                    GameGuest0.
                    setAdded_by_user(relatedAdded_by_user0);
                }
            
                const relatedAdded_by_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GameGuest1 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameGuest1?.setAdded_by_user)
                {
                    await
                    GameGuest1.
                    setAdded_by_user(relatedAdded_by_user1);
                }
            
                const relatedAdded_by_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GameGuest2 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameGuest2?.setAdded_by_user)
                {
                    await
                    GameGuest2.
                    setAdded_by_user(relatedAdded_by_user2);
                }
            
                const relatedAdded_by_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GameGuest3 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameGuest3?.setAdded_by_user)
                {
                    await
                    GameGuest3.
                    setAdded_by_user(relatedAdded_by_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGameGuestWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameGuest0 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameGuest0?.setOrganization)
                {
                    await
                    GameGuest0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameGuest1 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameGuest1?.setOrganization)
                {
                    await
                    GameGuest1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameGuest2 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameGuest2?.setOrganization)
                {
                    await
                    GameGuest2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameGuest3 = await GameGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameGuest3?.setOrganization)
                {
                    await
                    GameGuest3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameTeamWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameTeam0 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeam0?.setGame)
                {
                    await
                    GameTeam0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameTeam1 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeam1?.setGame)
                {
                    await
                    GameTeam1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameTeam2 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeam2?.setGame)
                {
                    await
                    GameTeam2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameTeam3 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeam3?.setGame)
                {
                    await
                    GameTeam3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGameTeamWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeam0 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeam0?.setOrganization)
                {
                    await
                    GameTeam0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeam1 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeam1?.setOrganization)
                {
                    await
                    GameTeam1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeam2 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeam2?.setOrganization)
                {
                    await
                    GameTeam2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeam3 = await GameTeams.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeam3?.setOrganization)
                {
                    await
                    GameTeam3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameTeamAssignmentWithGame_team() {
            
                const relatedGame_team0 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GameTeamAssignment0 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeamAssignment0?.setGame_team)
                {
                    await
                    GameTeamAssignment0.
                    setGame_team(relatedGame_team0);
                }
            
                const relatedGame_team1 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GameTeamAssignment1 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeamAssignment1?.setGame_team)
                {
                    await
                    GameTeamAssignment1.
                    setGame_team(relatedGame_team1);
                }
            
                const relatedGame_team2 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GameTeamAssignment2 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeamAssignment2?.setGame_team)
                {
                    await
                    GameTeamAssignment2.
                    setGame_team(relatedGame_team2);
                }
            
                const relatedGame_team3 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GameTeamAssignment3 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeamAssignment3?.setGame_team)
                {
                    await
                    GameTeamAssignment3.
                    setGame_team(relatedGame_team3);
                }
            
        }
        
    
        
            
            async function associateGameTeamAssignmentWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameTeamAssignment0 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeamAssignment0?.setPlayer)
                {
                    await
                    GameTeamAssignment0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameTeamAssignment1 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeamAssignment1?.setPlayer)
                {
                    await
                    GameTeamAssignment1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameTeamAssignment2 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeamAssignment2?.setPlayer)
                {
                    await
                    GameTeamAssignment2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameTeamAssignment3 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeamAssignment3?.setPlayer)
                {
                    await
                    GameTeamAssignment3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
            
            async function associateGameTeamAssignmentWithGuest() {
            
                const relatedGuest0 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameTeamAssignment0 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeamAssignment0?.setGuest)
                {
                    await
                    GameTeamAssignment0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameTeamAssignment1 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeamAssignment1?.setGuest)
                {
                    await
                    GameTeamAssignment1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameTeamAssignment2 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeamAssignment2?.setGuest)
                {
                    await
                    GameTeamAssignment2.
                    setGuest(relatedGuest2);
                }
            
                const relatedGuest3 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameTeamAssignment3 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeamAssignment3?.setGuest)
                {
                    await
                    GameTeamAssignment3.
                    setGuest(relatedGuest3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateGameTeamAssignmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeamAssignment0 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameTeamAssignment0?.setOrganization)
                {
                    await
                    GameTeamAssignment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeamAssignment1 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameTeamAssignment1?.setOrganization)
                {
                    await
                    GameTeamAssignment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeamAssignment2 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameTeamAssignment2?.setOrganization)
                {
                    await
                    GameTeamAssignment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameTeamAssignment3 = await GameTeamAssignments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameTeamAssignment3?.setOrganization)
                {
                    await
                    GameTeamAssignment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGameAttendanceWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameAttendance0 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameAttendance0?.setGame)
                {
                    await
                    GameAttendance0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameAttendance1 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameAttendance1?.setGame)
                {
                    await
                    GameAttendance1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameAttendance2 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameAttendance2?.setGame)
                {
                    await
                    GameAttendance2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GameAttendance3 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameAttendance3?.setGame)
                {
                    await
                    GameAttendance3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
            
            async function associateGameAttendanceWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameAttendance0 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameAttendance0?.setPlayer)
                {
                    await
                    GameAttendance0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameAttendance1 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameAttendance1?.setPlayer)
                {
                    await
                    GameAttendance1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameAttendance2 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameAttendance2?.setPlayer)
                {
                    await
                    GameAttendance2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GameAttendance3 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameAttendance3?.setPlayer)
                {
                    await
                    GameAttendance3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
            
            async function associateGameAttendanceWithGuest() {
            
                const relatedGuest0 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameAttendance0 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameAttendance0?.setGuest)
                {
                    await
                    GameAttendance0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameAttendance1 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameAttendance1?.setGuest)
                {
                    await
                    GameAttendance1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameAttendance2 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameAttendance2?.setGuest)
                {
                    await
                    GameAttendance2.
                    setGuest(relatedGuest2);
                }
            
                const relatedGuest3 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GameAttendance3 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameAttendance3?.setGuest)
                {
                    await
                    GameAttendance3.
                    setGuest(relatedGuest3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateGameAttendanceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameAttendance0 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GameAttendance0?.setOrganization)
                {
                    await
                    GameAttendance0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameAttendance1 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GameAttendance1?.setOrganization)
                {
                    await
                    GameAttendance1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameAttendance2 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GameAttendance2?.setOrganization)
                {
                    await
                    GameAttendance2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GameAttendance3 = await GameAttendances.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GameAttendance3?.setOrganization)
                {
                    await
                    GameAttendance3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGamePlayerStatWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePlayerStat0 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePlayerStat0?.setGame)
                {
                    await
                    GamePlayerStat0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePlayerStat1 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePlayerStat1?.setGame)
                {
                    await
                    GamePlayerStat1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePlayerStat2 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePlayerStat2?.setGame)
                {
                    await
                    GamePlayerStat2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePlayerStat3 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePlayerStat3?.setGame)
                {
                    await
                    GamePlayerStat3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
            
            async function associateGamePlayerStatWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePlayerStat0 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePlayerStat0?.setPlayer)
                {
                    await
                    GamePlayerStat0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePlayerStat1 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePlayerStat1?.setPlayer)
                {
                    await
                    GamePlayerStat1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePlayerStat2 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePlayerStat2?.setPlayer)
                {
                    await
                    GamePlayerStat2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePlayerStat3 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePlayerStat3?.setPlayer)
                {
                    await
                    GamePlayerStat3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
            
            async function associateGamePlayerStatWithGame_team() {
            
                const relatedGame_team0 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GamePlayerStat0 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePlayerStat0?.setGame_team)
                {
                    await
                    GamePlayerStat0.
                    setGame_team(relatedGame_team0);
                }
            
                const relatedGame_team1 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GamePlayerStat1 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePlayerStat1?.setGame_team)
                {
                    await
                    GamePlayerStat1.
                    setGame_team(relatedGame_team1);
                }
            
                const relatedGame_team2 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GamePlayerStat2 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePlayerStat2?.setGame_team)
                {
                    await
                    GamePlayerStat2.
                    setGame_team(relatedGame_team2);
                }
            
                const relatedGame_team3 = await GameTeams.findOne({
                    offset: Math.floor(Math.random() * (await GameTeams.count())),
                });
                const GamePlayerStat3 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePlayerStat3?.setGame_team)
                {
                    await
                    GamePlayerStat3.
                    setGame_team(relatedGame_team3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateGamePlayerStatWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePlayerStat0 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePlayerStat0?.setOrganization)
                {
                    await
                    GamePlayerStat0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePlayerStat1 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePlayerStat1?.setOrganization)
                {
                    await
                    GamePlayerStat1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePlayerStat2 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePlayerStat2?.setOrganization)
                {
                    await
                    GamePlayerStat2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePlayerStat3 = await GamePlayerStats.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePlayerStat3?.setOrganization)
                {
                    await
                    GamePlayerStat3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGamePaymentWithGame() {
            
                const relatedGame0 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePayment0 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePayment0?.setGame)
                {
                    await
                    GamePayment0.
                    setGame(relatedGame0);
                }
            
                const relatedGame1 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePayment1 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePayment1?.setGame)
                {
                    await
                    GamePayment1.
                    setGame(relatedGame1);
                }
            
                const relatedGame2 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePayment2 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePayment2?.setGame)
                {
                    await
                    GamePayment2.
                    setGame(relatedGame2);
                }
            
                const relatedGame3 = await Games.findOne({
                    offset: Math.floor(Math.random() * (await Games.count())),
                });
                const GamePayment3 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePayment3?.setGame)
                {
                    await
                    GamePayment3.
                    setGame(relatedGame3);
                }
            
        }
        
    
        
            
            async function associateGamePaymentWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePayment0 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePayment0?.setPlayer)
                {
                    await
                    GamePayment0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePayment1 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePayment1?.setPlayer)
                {
                    await
                    GamePayment1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePayment2 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePayment2?.setPlayer)
                {
                    await
                    GamePayment2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const GamePayment3 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePayment3?.setPlayer)
                {
                    await
                    GamePayment3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
            
            async function associateGamePaymentWithGuest() {
            
                const relatedGuest0 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GamePayment0 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePayment0?.setGuest)
                {
                    await
                    GamePayment0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GamePayment1 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePayment1?.setGuest)
                {
                    await
                    GamePayment1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GamePayment2 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePayment2?.setGuest)
                {
                    await
                    GamePayment2.
                    setGuest(relatedGuest2);
                }
            
                const relatedGuest3 = await GameGuests.findOne({
                    offset: Math.floor(Math.random() * (await GameGuests.count())),
                });
                const GamePayment3 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePayment3?.setGuest)
                {
                    await
                    GamePayment3.
                    setGuest(relatedGuest3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGamePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePayment0 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GamePayment0?.setOrganization)
                {
                    await
                    GamePayment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePayment1 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GamePayment1?.setOrganization)
                {
                    await
                    GamePayment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePayment2 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GamePayment2?.setOrganization)
                {
                    await
                    GamePayment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GamePayment3 = await GamePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GamePayment3?.setOrganization)
                {
                    await
                    GamePayment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeaguePaymentWithLeague() {
            
                const relatedLeague0 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeaguePayment0 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaguePayment0?.setLeague)
                {
                    await
                    LeaguePayment0.
                    setLeague(relatedLeague0);
                }
            
                const relatedLeague1 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeaguePayment1 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaguePayment1?.setLeague)
                {
                    await
                    LeaguePayment1.
                    setLeague(relatedLeague1);
                }
            
                const relatedLeague2 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeaguePayment2 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaguePayment2?.setLeague)
                {
                    await
                    LeaguePayment2.
                    setLeague(relatedLeague2);
                }
            
                const relatedLeague3 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeaguePayment3 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeaguePayment3?.setLeague)
                {
                    await
                    LeaguePayment3.
                    setLeague(relatedLeague3);
                }
            
        }
        
    
        
            
            async function associateLeaguePaymentWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeaguePayment0 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaguePayment0?.setPlayer)
                {
                    await
                    LeaguePayment0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeaguePayment1 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaguePayment1?.setPlayer)
                {
                    await
                    LeaguePayment1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeaguePayment2 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaguePayment2?.setPlayer)
                {
                    await
                    LeaguePayment2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeaguePayment3 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeaguePayment3?.setPlayer)
                {
                    await
                    LeaguePayment3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLeaguePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaguePayment0 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaguePayment0?.setOrganization)
                {
                    await
                    LeaguePayment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaguePayment1 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaguePayment1?.setOrganization)
                {
                    await
                    LeaguePayment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaguePayment2 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaguePayment2?.setOrganization)
                {
                    await
                    LeaguePayment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaguePayment3 = await LeaguePayments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeaguePayment3?.setOrganization)
                {
                    await
                    LeaguePayment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeagueStandingWithLeague() {
            
                const relatedLeague0 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueStanding0 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueStanding0?.setLeague)
                {
                    await
                    LeagueStanding0.
                    setLeague(relatedLeague0);
                }
            
                const relatedLeague1 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueStanding1 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueStanding1?.setLeague)
                {
                    await
                    LeagueStanding1.
                    setLeague(relatedLeague1);
                }
            
                const relatedLeague2 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueStanding2 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueStanding2?.setLeague)
                {
                    await
                    LeagueStanding2.
                    setLeague(relatedLeague2);
                }
            
                const relatedLeague3 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueStanding3 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueStanding3?.setLeague)
                {
                    await
                    LeagueStanding3.
                    setLeague(relatedLeague3);
                }
            
        }
        
    
        
            
            async function associateLeagueStandingWithLeague_team() {
            
                const relatedLeague_team0 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueStanding0 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueStanding0?.setLeague_team)
                {
                    await
                    LeagueStanding0.
                    setLeague_team(relatedLeague_team0);
                }
            
                const relatedLeague_team1 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueStanding1 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueStanding1?.setLeague_team)
                {
                    await
                    LeagueStanding1.
                    setLeague_team(relatedLeague_team1);
                }
            
                const relatedLeague_team2 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueStanding2 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueStanding2?.setLeague_team)
                {
                    await
                    LeagueStanding2.
                    setLeague_team(relatedLeague_team2);
                }
            
                const relatedLeague_team3 = await LeagueTeams.findOne({
                    offset: Math.floor(Math.random() * (await LeagueTeams.count())),
                });
                const LeagueStanding3 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueStanding3?.setLeague_team)
                {
                    await
                    LeagueStanding3.
                    setLeague_team(relatedLeague_team3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLeagueStandingWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueStanding0 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueStanding0?.setOrganization)
                {
                    await
                    LeagueStanding0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueStanding1 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueStanding1?.setOrganization)
                {
                    await
                    LeagueStanding1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueStanding2 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueStanding2?.setOrganization)
                {
                    await
                    LeagueStanding2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueStanding3 = await LeagueStandings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueStanding3?.setOrganization)
                {
                    await
                    LeagueStanding3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeagueFinishAwardWithLeague() {
            
                const relatedLeague0 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueFinishAward0 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueFinishAward0?.setLeague)
                {
                    await
                    LeagueFinishAward0.
                    setLeague(relatedLeague0);
                }
            
                const relatedLeague1 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueFinishAward1 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueFinishAward1?.setLeague)
                {
                    await
                    LeagueFinishAward1.
                    setLeague(relatedLeague1);
                }
            
                const relatedLeague2 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueFinishAward2 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueFinishAward2?.setLeague)
                {
                    await
                    LeagueFinishAward2.
                    setLeague(relatedLeague2);
                }
            
                const relatedLeague3 = await Leagues.findOne({
                    offset: Math.floor(Math.random() * (await Leagues.count())),
                });
                const LeagueFinishAward3 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueFinishAward3?.setLeague)
                {
                    await
                    LeagueFinishAward3.
                    setLeague(relatedLeague3);
                }
            
        }
        
    
        
            
            async function associateLeagueFinishAwardWithPlayer() {
            
                const relatedPlayer0 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueFinishAward0 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueFinishAward0?.setPlayer)
                {
                    await
                    LeagueFinishAward0.
                    setPlayer(relatedPlayer0);
                }
            
                const relatedPlayer1 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueFinishAward1 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueFinishAward1?.setPlayer)
                {
                    await
                    LeagueFinishAward1.
                    setPlayer(relatedPlayer1);
                }
            
                const relatedPlayer2 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueFinishAward2 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueFinishAward2?.setPlayer)
                {
                    await
                    LeagueFinishAward2.
                    setPlayer(relatedPlayer2);
                }
            
                const relatedPlayer3 = await Players.findOne({
                    offset: Math.floor(Math.random() * (await Players.count())),
                });
                const LeagueFinishAward3 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueFinishAward3?.setPlayer)
                {
                    await
                    LeagueFinishAward3.
                    setPlayer(relatedPlayer3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateLeagueFinishAwardWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueFinishAward0 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeagueFinishAward0?.setOrganization)
                {
                    await
                    LeagueFinishAward0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueFinishAward1 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeagueFinishAward1?.setOrganization)
                {
                    await
                    LeagueFinishAward1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueFinishAward2 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeagueFinishAward2?.setOrganization)
                {
                    await
                    LeagueFinishAward2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeagueFinishAward3 = await LeagueFinishAwards.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LeagueFinishAward3?.setOrganization)
                {
                    await
                    LeagueFinishAward3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateNotificationWithRecipient_user() {
            
                const relatedRecipient_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setRecipient_user)
                {
                    await
                    Notification0.
                    setRecipient_user(relatedRecipient_user0);
                }
            
                const relatedRecipient_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setRecipient_user)
                {
                    await
                    Notification1.
                    setRecipient_user(relatedRecipient_user1);
                }
            
                const relatedRecipient_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setRecipient_user)
                {
                    await
                    Notification2.
                    setRecipient_user(relatedRecipient_user2);
                }
            
                const relatedRecipient_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification3 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Notification3?.setRecipient_user)
                {
                    await
                    Notification3.
                    setRecipient_user(relatedRecipient_user3);
                }
            
        }
        
    
        
            
            async function associateNotificationWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setClub)
                {
                    await
                    Notification0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setClub)
                {
                    await
                    Notification1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setClub)
                {
                    await
                    Notification2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const Notification3 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Notification3?.setClub)
                {
                    await
                    Notification3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateNotificationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setOrganization)
                {
                    await
                    Notification0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setOrganization)
                {
                    await
                    Notification1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setOrganization)
                {
                    await
                    Notification2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification3 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Notification3?.setOrganization)
                {
                    await
                    Notification3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateAuditEventWithClub() {
            
                const relatedClub0 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const AuditEvent0 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditEvent0?.setClub)
                {
                    await
                    AuditEvent0.
                    setClub(relatedClub0);
                }
            
                const relatedClub1 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const AuditEvent1 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditEvent1?.setClub)
                {
                    await
                    AuditEvent1.
                    setClub(relatedClub1);
                }
            
                const relatedClub2 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const AuditEvent2 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditEvent2?.setClub)
                {
                    await
                    AuditEvent2.
                    setClub(relatedClub2);
                }
            
                const relatedClub3 = await Clubs.findOne({
                    offset: Math.floor(Math.random() * (await Clubs.count())),
                });
                const AuditEvent3 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditEvent3?.setClub)
                {
                    await
                    AuditEvent3.
                    setClub(relatedClub3);
                }
            
        }
        
    
        
            
            async function associateAuditEventWithActor_user() {
            
                const relatedActor_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent0 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditEvent0?.setActor_user)
                {
                    await
                    AuditEvent0.
                    setActor_user(relatedActor_user0);
                }
            
                const relatedActor_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent1 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditEvent1?.setActor_user)
                {
                    await
                    AuditEvent1.
                    setActor_user(relatedActor_user1);
                }
            
                const relatedActor_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent2 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditEvent2?.setActor_user)
                {
                    await
                    AuditEvent2.
                    setActor_user(relatedActor_user2);
                }
            
                const relatedActor_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent3 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditEvent3?.setActor_user)
                {
                    await
                    AuditEvent3.
                    setActor_user(relatedActor_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAuditEventWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditEvent0 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditEvent0?.setOrganization)
                {
                    await
                    AuditEvent0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditEvent1 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditEvent1?.setOrganization)
                {
                    await
                    AuditEvent1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditEvent2 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditEvent2?.setOrganization)
                {
                    await
                    AuditEvent2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditEvent3 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditEvent3?.setOrganization)
                {
                    await
                    AuditEvent3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Clubs.bulkCreate(ClubsData);
                
            
            
                
                await ClubMemberships.bulkCreate(ClubMembershipsData);
                
            
            
                
                await Players.bulkCreate(PlayersData);
                
            
            
                
                await SeedVotes.bulkCreate(SeedVotesData);
                
            
            
                
                await Venues.bulkCreate(VenuesData);
                
            
            
                
                await Leagues.bulkCreate(LeaguesData);
                
            
            
                
                await LeagueTeams.bulkCreate(LeagueTeamsData);
                
            
            
                
                await LeagueTeamPlayers.bulkCreate(LeagueTeamPlayersData);
                
            
            
                
                await Games.bulkCreate(GamesData);
                
            
            
                
                await GameRsvps.bulkCreate(GameRsvpsData);
                
            
            
                
                await GameGuests.bulkCreate(GameGuestsData);
                
            
            
                
                await GameTeams.bulkCreate(GameTeamsData);
                
            
            
                
                await GameTeamAssignments.bulkCreate(GameTeamAssignmentsData);
                
            
            
                
                await GameAttendances.bulkCreate(GameAttendancesData);
                
            
            
                
                await GamePlayerStats.bulkCreate(GamePlayerStatsData);
                
            
            
                
                await GamePayments.bulkCreate(GamePaymentsData);
                
            
            
                
                await LeaguePayments.bulkCreate(LeaguePaymentsData);
                
            
            
                
                await LeagueStandings.bulkCreate(LeagueStandingsData);
                
            
            
                
                await LeagueFinishAwards.bulkCreate(LeagueFinishAwardsData);
                
            
            
                
                await Notifications.bulkCreate(NotificationsData);
                
            
            
                
                await AuditEvents.bulkCreate(AuditEventsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateClubWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateClubMembershipWithClub(),
                    
                
                    
                        
                        await associateClubMembershipWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateClubMembershipWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePlayerWithClub(),
                    
                
                    
                        
                        await associatePlayerWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePlayerWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSeedVoteWithClub(),
                    
                
                    
                        
                        await associateSeedVoteWithVoter_user(),
                    
                
                    
                        
                        await associateSeedVoteWithTarget_player(),
                    
                
                    
                
                    
                
                    
                        
                        await associateSeedVoteWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateVenueWithClub(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateVenueWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeagueWithClub(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeagueWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeagueTeamWithLeague(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeagueTeamWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeagueTeamPlayerWithLeague_team(),
                    
                
                    
                        
                        await associateLeagueTeamPlayerWithPlayer(),
                    
                
                    
                
                    
                        
                        await associateLeagueTeamPlayerWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameWithClub(),
                    
                
                    
                        
                        await associateGameWithLeague(),
                    
                
                    
                        
                        await associateGameWithVenue(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGameWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameRsvpWithGame(),
                    
                
                    
                        
                        await associateGameRsvpWithPlayer(),
                    
                
                    
                
                    
                
                    
                        
                        await associateGameRsvpWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameGuestWithGame(),
                    
                
                    
                        
                        await associateGameGuestWithAdded_by_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGameGuestWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameTeamWithGame(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGameTeamWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameTeamAssignmentWithGame_team(),
                    
                
                    
                        
                        await associateGameTeamAssignmentWithPlayer(),
                    
                
                    
                        
                        await associateGameTeamAssignmentWithGuest(),
                    
                
                    
                
                    
                
                    
                        
                        await associateGameTeamAssignmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGameAttendanceWithGame(),
                    
                
                    
                        
                        await associateGameAttendanceWithPlayer(),
                    
                
                    
                        
                        await associateGameAttendanceWithGuest(),
                    
                
                    
                
                    
                
                    
                        
                        await associateGameAttendanceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGamePlayerStatWithGame(),
                    
                
                    
                        
                        await associateGamePlayerStatWithPlayer(),
                    
                
                    
                        
                        await associateGamePlayerStatWithGame_team(),
                    
                
                    
                
                    
                
                    
                        
                        await associateGamePlayerStatWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGamePaymentWithGame(),
                    
                
                    
                        
                        await associateGamePaymentWithPlayer(),
                    
                
                    
                        
                        await associateGamePaymentWithGuest(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGamePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeaguePaymentWithLeague(),
                    
                
                    
                        
                        await associateLeaguePaymentWithPlayer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeaguePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeagueStandingWithLeague(),
                    
                
                    
                        
                        await associateLeagueStandingWithLeague_team(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeagueStandingWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeagueFinishAwardWithLeague(),
                    
                
                    
                        
                        await associateLeagueFinishAwardWithPlayer(),
                    
                
                    
                
                    
                
                    
                        
                        await associateLeagueFinishAwardWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateNotificationWithRecipient_user(),
                    
                
                    
                        
                        await associateNotificationWithClub(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateNotificationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAuditEventWithClub(),
                    
                
                    
                        
                        await associateAuditEventWithActor_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAuditEventWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('clubs', null, {});
            
            
            await queryInterface.bulkDelete('club_memberships', null, {});
            
            
            await queryInterface.bulkDelete('players', null, {});
            
            
            await queryInterface.bulkDelete('seed_votes', null, {});
            
            
            await queryInterface.bulkDelete('venues', null, {});
            
            
            await queryInterface.bulkDelete('leagues', null, {});
            
            
            await queryInterface.bulkDelete('league_teams', null, {});
            
            
            await queryInterface.bulkDelete('league_team_players', null, {});
            
            
            await queryInterface.bulkDelete('games', null, {});
            
            
            await queryInterface.bulkDelete('game_rsvps', null, {});
            
            
            await queryInterface.bulkDelete('game_guests', null, {});
            
            
            await queryInterface.bulkDelete('game_teams', null, {});
            
            
            await queryInterface.bulkDelete('game_team_assignments', null, {});
            
            
            await queryInterface.bulkDelete('game_attendances', null, {});
            
            
            await queryInterface.bulkDelete('game_player_stats', null, {});
            
            
            await queryInterface.bulkDelete('game_payments', null, {});
            
            
            await queryInterface.bulkDelete('league_payments', null, {});
            
            
            await queryInterface.bulkDelete('league_standings', null, {});
            
            
            await queryInterface.bulkDelete('league_finish_awards', null, {});
            
            
            await queryInterface.bulkDelete('notifications', null, {});
            
            
            await queryInterface.bulkDelete('audit_events', null, {});
            
        
    },
};