From aa4073cfb7a0df1c9aaa482ecf720339eff73277 Mon Sep 17 00:00:00 2001 From: ahpham123 Date: Sun, 27 Apr 2025 16:16:19 -0700 Subject: [PATCH] error opening db with sqlite3 reader --- go.mod | 1 + go.sum | 2 + internal/db/db.go | 3 - internal/db/models/board.sql.go | 64 +- internal/db/models/models.go | 36 +- internal/db/officers.json | 1376 ++++++++++++++++++++++++++++ internal/db/populatescript.go | 128 +++ internal/db/sql/schemas/schema.sql | 6 +- tmp/build-errors.log | 1 + 9 files changed, 1573 insertions(+), 44 deletions(-) delete mode 100644 internal/db/db.go create mode 100644 internal/db/officers.json create mode 100644 internal/db/populatescript.go create mode 100644 tmp/build-errors.log diff --git a/go.mod b/go.mod index 34d52cd..6c2247e 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-sqlite3 v1.14.27 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect diff --git a/go.sum b/go.sum index 8839864..d4c8717 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,8 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-sqlite3 v1.14.27 h1:drZCnuvf37yPfs95E5jd9s3XhdVWLal+6BOK6qrv6IU= +github.com/mattn/go-sqlite3 v1.14.27/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= diff --git a/internal/db/db.go b/internal/db/db.go deleted file mode 100644 index 79526fe..0000000 --- a/internal/db/db.go +++ /dev/null @@ -1,3 +0,0 @@ -package db - -//go:generate sqlc generate diff --git a/internal/db/models/board.sql.go b/internal/db/models/board.sql.go index 96338a0..30fc951 100644 --- a/internal/db/models/board.sql.go +++ b/internal/db/models/board.sql.go @@ -7,34 +7,56 @@ package models import ( "context" + "database/sql" ) const getBoard = `-- name: GetBoard :one SELECT - id, - name, - branch, - github, - discord, - year, - bio + full_name, + picture, + discord FROM - board_member + officers WHERE - id = ? + uuid = ? ` -func (q *Queries) GetBoard(ctx context.Context, id interface{}) (BoardMember, error) { - row := q.db.QueryRowContext(ctx, getBoard, id) - var i BoardMember - err := row.Scan( - &i.ID, - &i.Name, - &i.Branch, - &i.Github, - &i.Discord, - &i.Year, - &i.Bio, - ) +type GetBoardRow struct { + FullName string `json:"full_name"` + Picture sql.NullString `json:"picture"` + Discord sql.NullString `json:"discord"` +} + +func (q *Queries) GetBoard(ctx context.Context, uuid interface{}) (GetBoardRow, error) { + row := q.db.QueryRowContext(ctx, getBoard, uuid) + var i GetBoardRow + err := row.Scan(&i.FullName, &i.Picture, &i.Discord) + return i, err +} + +const getPositions = `-- name: GetPositions :one +SELECT + tiers.title, + tiers.team, + positions.semester +FROM + officers +INNER JOIN positions + ON officers.uuid = positions.oid +INNER JOIN tiers + ON positions.tier = tiers.tier +WHERE officers.full_name = ? +` + +type GetPositionsRow struct { + Title sql.NullString `json:"title"` + Team sql.NullString `json:"team"` + Semester interface{} `json:"semester"` +} + +func (q *Queries) GetPositions(ctx context.Context, fullName string) (GetPositionsRow, error) { + row := q.db.QueryRowContext(ctx, getPositions, fullName) + var i GetPositionsRow + err := row.Scan(&i.Title, &i.Team, &i.Semester) return i, err } diff --git a/internal/db/models/models.go b/internal/db/models/models.go index c71af62..1a89277 100644 --- a/internal/db/models/models.go +++ b/internal/db/models/models.go @@ -16,20 +16,6 @@ type Announcement struct { DiscordMessageID sql.NullString `json:"discord_message_id"` } -type BoardMember struct { - ID interface{} `json:"id"` - Name string `json:"name"` - Branch string `json:"branch"` - Github sql.NullString `json:"github"` - Discord sql.NullString `json:"discord"` - Year sql.NullInt64 `json:"year"` - Bio sql.NullString `json:"bio"` -} - -type Branch struct { - Name string `json:"name"` -} - type Event struct { Uuid string `json:"uuid"` Location string `json:"location"` @@ -39,9 +25,12 @@ type Event struct { Host string `json:"host"` } -type MemberOf struct { - Bmid interface{} `json:"bmid"` - Bname string `json:"bname"` +type Officer struct { + Uuid interface{} `json:"uuid"` + FullName string `json:"full_name"` + Picture sql.NullString `json:"picture"` + Github sql.NullString `json:"github"` + Discord sql.NullString `json:"discord"` } type Person struct { @@ -49,3 +38,16 @@ type Person struct { Name sql.NullString `json:"name"` PreferredPronoun sql.NullString `json:"preferred_pronoun"` } + +type Position struct { + Oid interface{} `json:"oid"` + Semester interface{} `json:"semester"` + Tier int64 `json:"tier"` +} + +type Tier struct { + Tier int64 `json:"tier"` + Title sql.NullString `json:"title"` + TIndex sql.NullInt64 `json:"t_index"` + Team sql.NullString `json:"team"` +} diff --git a/internal/db/officers.json b/internal/db/officers.json new file mode 100644 index 0000000..eb604ba --- /dev/null +++ b/internal/db/officers.json @@ -0,0 +1,1376 @@ +[ + { + "fullName": "Sama Ahmed", + "picture": "sama-ahmed.webp", + "positions": { + "S24": [{ "title": "Design Officer", "tier": 16 }], + "F24": [ + { "title": "Webmaster", "tier": 2 }, + { "title": "Open Source Software Co-TL", "tier": 33 }, + { "title": "Design Officer", "tier": 16 } + ], + "S25": [ + { "title": "Webmaster", "tier": 2 }, + { "title": "Open Source Software Co-TL", "tier": 33 } + ] + }, + "discord": "@semsema" + }, + { + "fullName": "Armanul Ambia", + "picture": "armanul-ambia.webp", + "positions": { + "S21": [{ "title": "Dev Officer", "tier": 19 }], + "F21": [{ "title": "Algo Director", "tier": 11 }], + "S22": [{ "title": "Algo President", "tier": 11 }], + "F22": [{ "title": "Algo Team Lead", "tier": 11 }], + "S23": [{ "title": "Algo Team Lead", "tier": 11 }] + } + }, + { + "fullName": "Gabriella Amedu", + "picture": "gabriella-amedu.webp", + "positions": { "S24": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Jason Anthony", + "picture": "jason-anthony.webp", + "positions": { "S21": [{ "title": "Secretary", "tier": 5 }] } + }, + { + "fullName": "Angel Armendariz", + "picture": "angel-armendariz.webp", + "positions": { "S22": [{ "title": "Dev Project Manager", "tier": 18 }] } + }, + { + "fullName": "Ryan Avancena", + "picture": "ryan-avancena.webp", + "positions": { + "S24": [{ "title": "AI Officer", "tier": 21 }], + "F24": [ + { "title": "AI Team Lead", "tier": 20 }, + { "title": "Marketing Officer", "tier": 9 } + ], + "S25": [{ "title": "AI Team Lead", "tier": 20 }] + }, + "discord": "@bergerboyyy" + }, + { + "fullName": "Sami Bajwa", + "picture": "sami-bajwa.webp", + "positions": { + "F21": [{ "title": "Node Buds Officer", "tier": 26 }], + "S22": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "F22": [{ "title": "Algo Officer", "tier": 12 }], + "S23": [{ "title": "Algo Officer", "tier": 12 }] + } + }, + { + "fullName": "Boushra Bettir", + "picture": "boushra-bettir.webp", + "positions": { + "F23": [{ "title": "Dev Officer", "tier": 19 }], + "S24": [{ "title": "Dev Officer", "tier": 19 }] + } + }, + { + "fullName": "Dane Camacho", + "picture": "dane-camacho.webp", + "positions": { + "F23": [{ "title": "Game Dev Officer", "tier": 23 }], + "S24": [{ "title": "Game Dev Officer", "tier": 23 }], + "F24": [{ "title": "Game Dev Team Lead", "tier": 22 }], + "S25": [{ "title": "Game Dev Team Lead", "tier": 22 }] + }, + "discord": "@daynger808" + }, + { + "fullName": "Jacob Carlson", + "picture": "jacob-carlson.webp", + "positions": { + "S23": [{ "title": "Game Dev Officer", "tier": 23 }], + "F23": [{ "title": "Design Officer", "tier": 16 }], + "S25": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@jiink" + }, + { + "fullName": "Johnathan Carranza", + "picture": "johnathan-carranza.webp", + "positions": { "F21": [{ "title": "Dev Officer", "tier": 19 }] } + }, + { + "fullName": "Angel Cervantes", + "picture": "angel-cervantes.webp", + "positions": { + "S24": [{ "title": "Dev Officer", "tier": 19 }], + "F24": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [{ "title": "Algo Officer", "tier": 12 }] + }, + "discord": "@angellyn218" + }, + { + "fullName": "Ashley Chan", + "picture": "ashley-chan.webp", + "positions": { + "F23": [{ "title": "AI Officer", "tier": 21 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [ + { "title": "Marketing Officer", "tier": 9 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [ + { "title": "Marketing Officer", "tier": 9 }, + { "title": "Node Buds Officer", "tier": 26 } + ] + }, + "discord": "@ashleychan_" + }, + { + "fullName": "Dulce Funez", + "picture": "dulce-funez.webp", + "positions": { "S24": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Wesley Chou", + "picture": "wesley-chou.webp", + "positions": { + "S21": [{ "title": "Dev Officer", "tier": 19 }], + "F21": [{ "title": "Dev Director", "tier": 17 }], + "S22": [{ "title": "Dev President", "tier": 17 }], + "F22": [{ "title": "Marketing Co-Lead", "tier": 8 }], + "S23": [{ "title": "Marketing Team Lead", "tier": 8 }] + } + }, + { + "fullName": "Oscar Cisneros", + "picture": "oscar-cisneros.webp", + "positions": { + "S23": [{ "title": "Dev Officer", "tier": 19 }], + "F23": [ + { "title": "Dev Officer", "tier": 19 }, + { "title": "Open Source Software Officer", "tier": 33 } + ], + "S24": [ + { "title": "Dev Project Manager", "tier": 18 }, + { "title": "Open Source Software Officer", "tier": 33 } + ] + } + }, + { + "fullName": "Jacob Corletto", + "picture": "jacob-corletto.webp", + "positions": { + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + } + }, + { + "fullName": "Alan Cortez", + "picture": "alan-cortez.webp", + "positions": { + "S22": [{ "title": "Create Officer", "tier": 16 }], + "F22": [{ "title": "Design Team Lead", "tier": 13 }], + "S23": [{ "title": "Design Team Lead", "tier": 13 }], + "F23": [{ "title": "Design Team Lead", "tier": 13 }] + } + }, + { + "fullName": "Abel Daniel", + "picture": "placeholder.webp", + "positions": { + "F23": [{ "title": "Marketing Officer", "tier": 9 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [{ "title": "Secretary", "tier": 5 }], + "S25": [ + { "title": "Secretary", "tier": 5 }, + { "title": "Node Buds Officer", "tier": 26 } + ] + }, + "discord": "@stable.orbit" + }, + { + "fullName": "Ethan Davidson", + "picture": "ethan-davidson.webp", + "positions": { + "S21": [{ "title": "Webmaster", "tier": 2 }], + "F21": [{ "title": "Webmaster", "tier": 2 }], + "S22": [{ "title": "Webmaster", "tier": 2 }], + "F22": [ + { "title": "Vice President", "tier": 1 }, + { "title": "Webmaster", "tier": 2 } + ], + "S23": [ + { "title": "Vice President", "tier": 1 }, + { "title": "Webmaster", "tier": 2 } + ], + "F23": [ + { "title": "Webmaster", "tier": 2 }, + { "title": "Open Source Software TL", "tier": 32 } + ], + "S24": [ + { "title": "Webmaster", "tier": 2 }, + { "title": "Open Source Software TL", "tier": 32 } + ] + } + }, + { + "fullName": "Kevin Dillon", + "picture": "kevin-dillon.webp", + "positions": { "S21": [{ "title": "Algo Officer", "tier": 12 }] } + }, + { + "fullName": "Diamond Dinh", + "picture": "diamond-dinh.webp", + "positions": { + "S22": [{ "title": "Dev Project Manager", "tier": 18 }], + "F22": [{ "title": "Special Events Officer", "tier": 25 }], + "S23": [{ "title": "Special Events Officer", "tier": 25 }], + "F23": [{ "title": "Dev Team Lead", "tier": 17 }], + "S24": [{ "title": "Dev Team Lead", "tier": 17 }] + } + }, + { + "fullName": "Randy Do", + "picture": "randy-do.webp", + "positions": { + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [{ "title": "Algo Officer", "tier": 12 }], + "S25": [{ "title": "Algo Officer", "tier": 12 }] + }, + "discord": "@greenn_beann" + }, + { + "fullName": "Esteban Escartin", + "picture": "esteban-escartin.webp", + "positions": { + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [{ "title": "Algo Officer", "tier": 12 }], + "F24": [{ "title": "Vice President", "tier": 1 }], + "S25": [{ "title": "Vice President", "tier": 1 }] + }, + "discord": "@pillo." + }, + { + "fullName": "Mark Ryan Garcia", + "picture": "mark-ryan-garcia.webp", + "positions": { + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [ + { "title": "Marketing Team Lead", "tier": 8 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [ + { "title": "Marketing Team Lead", "tier": 8 }, + { "title": "Game Dev Officer", "tier": 23 }, + { "title": "Node Buds Officer", "tier": 26 } + ] + }, + "discord": "@xnaym" + }, + { + "fullName": "Gabrielius Gintalas", + "picture": "gabrielius-gintalas.webp", + "positions": { + "S24": [{ "title": "Game Dev Officer", "tier": 23 }], + "F24": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@gabeg" + }, + { + "fullName": "Nicholas Girmes", + "picture": "nick-girmes.webp", + "positions": { "S23": [{ "title": "Algo Officer", "tier": 12 }] } + }, + { + "fullName": "Eduardo Gomez", + "picture": "eduardo-gomez.webp", + "positions": { "S21": [{ "title": "Node Buds Officer", "tier": 26 }] } + }, + { + "fullName": "Nate Gries", + "picture": "nate-gries.webp", + "positions": { + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [{ "title": "Algo Officer", "tier": 12 }], + "F24": [ + { "title": "Algo Team Lead", "tier": 11 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [{ "title": "Algo Team Lead", "tier": 11 }] + }, + "discord": "@nategries" + }, + { + "fullName": "Nurhaliza Hassan", + "picture": "nurhaliza-hassan.webp", + "positions": { + "S22": [{ "title": "Marketing Director", "tier": 7 }], + "F22": [{ "title": "Marketing Co-Lead", "tier": 8 }] + } + }, + { + "fullName": "Jeremiah Herring", + "picture": "jeremiah-herring.webp", + "positions": { + "S24": [{ "title": "Algo Officer", "tier": 12 }], + "F24": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Open Source Software Officer", "tier": 33 } + ], + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@jerem2938" + }, + { + "fullName": "Kyle Ho", + "picture": "kyle-ho.webp", + "positions": { + "S24": [{ "title": "AI Officer", "tier": 21 }], + "F24": [{ "title": "AI Officer", "tier": 21 }], + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@kyle0532" + }, + { + "fullName": "Richard Hoang", + "picture": "richard-hoang.webp", + "positions": { + "S24": [{ "title": "Design Officer", "tier": 16 }], + "F24": [{ "title": "Design Officer", "tier": 16 }] + }, + "discord": "@renshintv" + }, + { + "fullName": "Lisa Hong", + "picture": "lisa-hong.webp", + "positions": { "S21": [{ "title": "Create Officer", "tier": 16 }] } + }, + { + "fullName": "Joshua Hughes", + "picture": "joshua-hughes.webp", + "positions": { "S21": [{ "title": "ICC Representative", "tier": 31 }] } + }, + { + "fullName": "Arish Imam", + "picture": "placeholder.webp", + "positions": { "F22": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Iftekharul Islam", + "picture": "iftekharul-islam.webp", + "positions": { "S22": [{ "title": "Algo Officer", "tier": 12 }] } + }, + { + "fullName": "Ibrahim Israr", + "picture": "ibrahim-israr.webp", + "positions": { "S22": [{ "title": "Secretary", "tier": 5 }] } + }, + { + "fullName": "Dave Javle", + "picture": "dave-javle.webp", + "positions": { + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [ + { "title": "Dev Officer", "tier": 19 }, + { "title": "Marketing Officer", "tier": 9 } + ], + "S25": [{ "title": "Dev Project Manager", "tier": 18 }] + }, + "discord": "@davejavle" + }, + { + "fullName": "Evan Jimenez", + "picture": "evan-jimenez.webp", + "positions": { + "S24": [{ "title": "Open Source Software Officer", "tier": 33 }], + "F24": [ + { "title": "Marketing Officer", "tier": 9 }, + { "title": "Open Source Software Officer", "tier": 33 } + ], + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@surrealreal_" + }, + { + "fullName": "Joel Anil John", + "picture": "joel-anil-john.webp", + "positions": { + "S22": [{ "title": "Dev Officer", "tier": 19 }], + "F22": [{ "title": "Algo Officer", "tier": 12 }], + "S23": [{ "title": "Algo Officer", "tier": 12 }], + "F23": [{ "title": "Algo Team Lead", "tier": 11 }], + "S24": [{ "title": "Algo Team Lead", "tier": 11 }] + } + }, + { + "fullName": "James Kim", + "picture": "james-kim.webp", + "positions": { + "F23": [{ "title": "Dev Officer", "tier": 19 }], + "S24": [{ "title": "Dev Officer", "tier": 19 }] + } + }, + { + "fullName": "Emily Krohn", + "picture": "emily-krohn.webp", + "positions": { + "S24": [{ "title": "Game Dev Officer", "tier": 23 }], + "F24": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@emilyk23" + }, + { + "fullName": "Ashley Kuewa", + "picture": "ashley-kuewa.webp", + "positions": { "S23": [{ "title": "Marketing Officer", "tier": 9 }] } + }, + { + "fullName": "Rohan Kunchala", + "picture": "rohan-kunchala.webp", + "positions": { + "F22": [{ "title": "Algo Officer", "tier": 12 }], + "S23": [{ "title": "Algo Officer", "tier": 12 }], + "F23": [{ "title": "Algo Officer", "tier": 12 }] + } + }, + { + "fullName": "Andy Lasso", + "picture": "andy-lasso.webp", + "positions": { "F21": [{ "title": "Dev Officer", "tier": 19 }] } + }, + { + "fullName": "Logan Langdon", + "picture": "placeholder.webp", + "positions": { + "S23": [{ "title": "Game Dev Officer", "tier": 23 }], + "F23": [{ "title": "Game Dev Team Lead", "tier": 22 }], + "S24": [{ "title": "Game Dev Team Lead", "tier": 22 }] + } + }, + { + "fullName": "Andrew Lau", + "picture": "andrew-lau.webp", + "positions": { "S21": [{ "title": "Treasurer", "tier": 4 }] } + }, + { + "fullName": "Matthew Lau", + "picture": "placeholder.webp", + "positions": { + "F23": [{ "title": "Marketing Officer", "tier": 9 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [{ "title": "Node Buds Officer", "tier": 26 }] + }, + "discord": "@.cheesee." + }, + { + "fullName": "Yulie Ledesma", + "picture": "yulie-ledesma.webp", + "positions": { + "F23": [{ "title": "Design Officer", "tier": 16 }], + "S24": [{ "title": "Design Officer", "tier": 16 }], + "F24": [{ "title": "Design Officer", "tier": 16 }], + "S25": [{ "title": "Design Officer", "tier": 16 }] + }, + "discord": "@vroyuh" + }, + { + "fullName": "Kenny Le", + "picture": "placeholder.webp", + "positions": { "S24": [{ "title": "Marketing Officer", "tier": 9 }] } + }, + { + "fullName": "Minh Le", + "picture": "minh-le.webp", + "positions": { "S22": [{ "title": "Dev Officer", "tier": 19 }] } + }, + { + "fullName": "Nguyen Le", + "picture": "nguyen-le.webp", + "positions": { "S22": [{ "title": "Data Analyst", "tier": 7 }] } + }, + { + "fullName": "Tommy Le", + "picture": "tommy-le.webp", + "positions": { + "F21": [{ "title": "Treasurer", "tier": 4 }], + "S22": [{ "title": "Treasurer", "tier": 4 }] + } + }, + { + "fullName": "Eugene Lee", + "picture": "eugene-lee.webp", + "positions": { + "S21": [{ "title": "Node Buds Officer", "tier": 26 }], + "F21": [{ "title": "Node Buds Officer", "tier": 26 }], + "S22": [{ "title": "Node Buds Officer", "tier": 26 }] + } + }, + { + "fullName": "Joe Lee", + "picture": "joe-lee.webp", + "positions": { + "S23": [{ "title": "Dev Officer", "tier": 19 }], + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [{ "title": "Design Team Lead", "tier": 13 }] + } + }, + { + "fullName": "Nolan Lee", + "picture": "nolan-lee.webp", + "positions": { + "S22": [{ "title": "Historian", "tier": 7 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + } + }, + { + "fullName": "Aaron Lieberman", + "picture": "aaron-lieberman.webp", + "positions": { + "S21": [{ "title": "Internal Vice President, Node Buds Officer", "tier": 1 }], + "F21": [{ "title": "President, Node Buds Officer", "tier": 0 }], + "S22": [{ "title": "President, Node Buds Officer", "tier": 0 }], + "F22": [{ "title": "Special Events Team Lead", "tier": 24 }], + "S23": [{ "title": "Special Events Team Lead", "tier": 24 }] + } + }, + { + "fullName": "Yao Lin", + "picture": "yao-lin.webp", + "positions": { "F22": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Eric Ly", + "picture": "eric-ly.webp", + "positions": { + "F23": [{ "title": "Treasurer", "tier": 4 }], + "S24": [{ "title": "Treasurer", "tier": 4 }], + "F24": [ + { "title": "Node Buds Team Lead", "tier": 34 }, + { "title": "AI Officer", "tier": 21 } + ], + "S25": [{ "title": "Node Buds Officer", "tier": 26 }] + }, + "discord": "@lyyeric" + }, + { + "fullName": "Shaleen Mathur", + "picture": "shaleen-mathur.webp", + "positions": { "S21": [{ "title": "Workshop Manager", "tier": 28 }] } + }, + { + "fullName": "Elena Marquez", + "picture": "elena-marquez.webp", + "positions": { + "F23": [{ "title": "Event Coordinator", "tier": 6 }], + "S24": [ + { "title": "Event Coordinator", "tier": 6 }, + { "title": "Marketing Officer", "tier": 9 } + ], + "F24": [ + { "title": "Event Coordinator", "tier": 6 }, + { "title": "Marketing Officer", "tier": 9 }, + { "title": "Node Buds Co-Team Lead", "tier": 36 } + ], + "S25": [ + { "title": "Event Coordinator", "tier": 6 }, + { "title": "Node Buds Team Lead", "tier": 34 } + ] + }, + "discord": "@evie724" + }, + { + "fullName": "Ean McGilvery", + "picture": "ean-mcgilvery.webp", + "positions": { "S21": [{ "title": "Node Buds Officer", "tier": 26 }] } + }, + { + "fullName": "Jorge Mejia", + "picture": "jorge-mejia.webp", + "positions": { + "F21": [{ "title": "Dev Officer", "tier": 19 }], + "S22": [{ "title": "Dev Officer", "tier": 19 }], + "F22": [{ "title": "Design Officer", "tier": 16 }], + "S23": [{ "title": "Design Officer", "tier": 16 }] + } + }, + { + "fullName": "Brian Milian", + "picture": "brian-milian.webp", + "positions": { + "S23": [{ "title": "Marketing Officer", "tier": 9 }], + "F23": [ + { "title": "Marketing Team Lead", "tier": 8 }, + { "title": "Algo Officer", "tier": 12 } + ], + "S24": [ + { "title": "Marketing Team Lead", "tier": 8 }, + { "title": "Algo Officer", "tier": 12 } + ] + } + }, + { + "fullName": "Jordan Muir", + "picture": "jordan-muir.webp", + "positions": { + "S23": [{ "title": "Game Dev Officer", "tier": 23 }], + "F23": [{ "title": "Game Dev Officer", "tier": 23 }], + "S24": [{ "title": "Game Dev Officer", "tier": 23 }], + "F24": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@muirror" + }, + { + "fullName": "Tanisha Naik", + "picture": "tanisha-naik.webp", + "positions": { + "S23": [{ "title": "Design Officer", "tier": 16 }], + "F23": [{ "title": "Design Officer", "tier": 16 }], + "S24": [{ "title": "Design Officer", "tier": 16 }], + "F24": [{ "title": "Design Team Lead", "tier": 13 }], + "S25": [{ "title": "Design Team Lead", "tier": 13 }] + }, + "discord": "@t_1907" + }, + { + "fullName": "Serena Naranjo", + "picture": "serena-naranjo.webp", + "positions": { + "F21": [{ "title": "Create Officer", "tier": 16 }], + "S22": [{ "title": "Create Officer", "tier": 16 }] + } + }, + { + "fullName": "Joseph Nasr", + "picture": "joseph-nasr.webp", + "positions": { "S23": [{ "title": "Game Dev Officer", "tier": 23 }] } + }, + { + "fullName": "Alexis Nemsingh", + "picture": "alexis-nemsingh.webp", + "positions": { + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@redsplash1" + }, + { + "fullName": "Dalisa Nguyen", + "picture": "dalisa-nguyen.webp", + "positions": { "S21": [{ "title": "Node Buds Officer", "tier": 26 }] } + }, + { + "fullName": "Kayla Nguyen", + "picture": "kayla-nguyen.webp", + "positions": { "F21": [{ "title": "Create Officer", "tier": 16 }] } + }, + { + "fullName": "Jacob Nguyen", + "picture": "jacob-nguyen.webp", + "positions": { + "S21": [{ "title": "President, Create Director, Node Buds Officer", "tier": 0 }], + "F22": [{ "title": "Treasurer", "tier": 4 }], + "S23": [{ "title": "Treasurer", "tier": 4 }] + } + }, + { + "fullName": "Ngoc Nguyen", + "picture": "ngoc-nguyen.webp", + "positions": { "F23": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Taylor Noh", + "picture": "taylor-noh.webp", + "positions": { + "S21": [{ "title": "Node Buds Officer", "tier": 26 }], + "F21": [{ "title": "Node Buds Officer", "tier": 26 }], + "S22": [{ "title": "Node Buds Officer", "tier": 26 }] + } + }, + { + "fullName": "Kirsten Ochoa", + "picture": "kirsten-ochoa.webp", + "positions": { + "S22": [{ "title": "Create Project Developer", "tier": 14 }], + "F22": [{ "title": "Design Officer", "tier": 16 }] + } + }, + { + "fullName": "Tomas Oh", + "picture": "tomas-oh.webp", + "positions": { + "S24": [{ "title": "Open Source Software Officer", "tier": 33 }], + "F24": [{ "title": "Open Source Software Team Lead", "tier": 32 }], + "S25": [{ "title": "Open Source Software Team Lead", "tier": 32 }] + }, + "discord": "@chomacito" + }, + { + "fullName": "Oyinkansola Olayinka", + "picture": "oyinkansola-olayinka.webp", + "positions": { + "F23": [{ "title": "Marketing Officer", "tier": 9 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + } + }, + { + "fullName": "Amy Parker", + "picture": "amy-parker.webp", + "positions": { + "F23": [{ "title": "Dev Officer", "tier": 19 }], + "S24": [{ "title": "Dev Officer", "tier": 19 }], + "F24": [{ "title": "Dev Team Lead", "tier": 17 }], + "S25": [{ "title": "Dev Team Lead", "tier": 17 }] + }, + "discord": "@amyipdev" + }, + { + "fullName": "Mike Ploythai", + "picture": "mike-ploythai.webp", + "positions": { + "S21": [{ "title": "Create Officer", "tier": 16 }], + "F21": [{ "title": "Create Director, Marketing Chair", "tier": 13 }], + "S22": [{ "title": "Create President", "tier": 13 }] + } + }, + { + "fullName": "Stephanie Pocci", + "picture": "stephanie-pocci.webp", + "positions": { + "S22": [{ "title": "Event Coordinator", "tier": 6 }], + "F22": [{ "title": "Event Coordinator", "tier": 6 }], + "S23": [{ "title": "Game Dev Team Lead", "tier": 22 }] + } + }, + { + "fullName": "Angela Queano", + "picture": "angela-queano.webp", + "positions": { "S23": [{ "title": "Marketing Officer", "tier": 9 }] } + }, + { + "fullName": "Nithin Rajesh", + "picture": "nithin-rajesh.webp", + "positions": { + "S24": [{ "title": "Game Dev Officer", "tier": 23 }], + "F24": [{ "title": "Game Dev Officer", "tier": 23 }], + "S25": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@ok7317" + }, + { + "fullName": "Alejandro Ramos", + "picture": "alejandro-ramos.webp", + "positions": { + "F22": [{ "title": "Design Officer", "tier": 16 }], + "S23": [{ "title": "Design Officer", "tier": 16 }] + } + }, + { + "fullName": "Nicolas Renteria", + "picture": "nicolas-renteria.webp", + "positions": { "S21": [{ "title": "Marketing Chair", "tier": 7 }] } + }, + { + "fullName": "Joel Daniel Rico", + "picture": "joel-daniel-rico.webp", + "positions": { + "F23": [{ "title": "AI Officer", "tier": 21 }], + "S24": [{ "title": "Dev Officer", "tier": 19 }], + "F24": [{ "title": "President", "tier": 0 }], + "S25": [{ "title": "President", "tier": 0 }] + }, + "discord": "@jjoeldaniel" + }, + { + "fullName": "Max Rivas", + "picture": "max-rivas.webp", + "positions": { + "F23": [{ "title": "Marketing Officer", "tier": 9 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [ + { "title": "Event Coordinator", "tier": 6 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [ + { "title": "Event Coordinator", "tier": 6 }, + { "title": "Node Buds Co-Team Lead", "tier": 36 } + ] + }, + "discord": "@meexy23" + }, + { + "fullName": "Wilbert Rodriguez", + "picture": "wilbert-rodriguez.webp", + "positions": { "S21": [{ "title": "Intern Program Manager", "tier": 29 }] } + }, + { + "fullName": "Vanessa Roque", + "picture": "vanessa-roque.webp", + "positions": { "S23": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Ashley Rus", + "picture": "placeholder.webp", + "positions": { + "S23": [{ "title": "AI Officer", "tier": 21 }], + "F23": [{ "title": "AI Team Lead", "tier": 20 }], + "S24": [{ "title": "AI Team Lead", "tier": 20 }] + } + }, + { + "fullName": "Sara Sadek", + "picture": "placeholder.webp", + "positions": { "F22": [{ "title": "AI Officer", "tier": 21 }] } + }, + { + "fullName": "Samuel Sandoval", + "picture": "samuel-sandoval.webp", + "positions": { + "S21": [ + { "title": "Vice President", "tier": 1 }, + { "title": "Dev Director", "tier": 17 } + ] + } + }, + { + "fullName": "Kavit Sanghavi", + "picture": "kavit-sanghavi.webp", + "positions": { "S21": [{ "title": "Algo Director", "tier": 11 }] } + }, + { + "fullName": "Angel Santoyo", + "picture": "angel-santoyo.webp", + "positions": { + "F22": [{ "title": "Dev Officer", "tier": 19 }], + "S23": [{ "title": "Dev Officer", "tier": 19 }], + "F23": [{ "title": "Dev Officer", "tier": 19 }] + } + }, + { + "fullName": "Sebastian Serrano", + "picture": "sebastian-serrano.webp", + "positions": { + "F23": [{ "title": "AI Officer", "tier": 21 }], + "S24": [{ "title": "AI Officer", "tier": 21 }] + } + }, + { + "fullName": "Parth Sharma", + "picture": "parth-sharma.webp", + "positions": { "S21": [{ "title": "Algo Officer", "tier": 12 }] } + }, + { + "fullName": "Patrick Smith", + "picture": "patrick-smith.webp", + "positions": { + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Marketing Officer", "tier": 9 } + ], + "F24": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Node Buds Officer", "tier": 26 } + ] + }, + "discord": "@pattyrick1" + }, + { + "fullName": "David Solano", + "picture": "david-solano.webp", + "positions": { + "S23": [{ "title": "Algo Officer", "tier": 12 }], + "F23": [ + { "title": "President", "tier": 0 }, + { "title": "Algo Officer", "tier": 12 } + ], + "S24": [ + { "title": "President", "tier": 0 }, + { "title": "Algo Officer", "tier": 12 } + ], + "F24": [ + { "title": "Treasurer", "tier": 4 }, + { "title": "Algo Officer", "tier": 12 }, + { "title": "Node Buds Officer", "tier": 26 } + ], + "S25": [ + { "title": "Treasurer", "tier": 4 }, + { "title": "Algo Officer", "tier": 12 } + ] + }, + "discord": "@davidjsol" + }, + { + "fullName": "James Owen Sterling", + "picture": "james-owen-sterling.webp", + "positions": { + "S24": [{ "title": "Open Source Software Officer", "tier": 33 }], + "F24": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@typos." + }, + { + "fullName": "Justin Stitt", + "picture": "justin-stitt.webp", + "positions": { + "S22": [{ "title": "Algo Officer", "tier": 12 }], + "F22": [{ "title": "AI Team Lead", "tier": 20 }], + "S23": [{ "title": "AI Team Lead", "tier": 20 }] + } + }, + { + "fullName": "Joann Sum", + "picture": "joann-sum.webp", + "positions": { + "S23": [{ "title": "Marketing Officer", "tier": 9 }], + "F24": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "AI Officer", "tier": 21 } + ], + "S25": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "AI Officer", "tier": 21 } + ] + }, + "discord": "@josu4412" + }, + { + "fullName": "Charlie Taylor", + "picture": "charlie-taylor.webp", + "positions": { + "F22": [{ "title": "Dev Team Lead", "tier": 17 }], + "S23": [{ "title": "Dev Team Lead", "tier": 17 }] + } + }, + { + "fullName": "Johnson Tong", + "picture": "johnson-tong.webp", + "positions": { "S21": [{ "title": "Workshop Manager", "tier": 28 }] } + }, + { + "fullName": "Alex Tran", + "picture": "alex-tran.webp", + "positions": { "F23": [{ "title": "Game Dev Officer", "tier": 23 }] } + }, + { + "fullName": "Alex Truong", + "picture": "alex-truong.webp", + "positions": { "F21": [{ "title": "Algo Officer", "tier": 12 }] } + }, + { + "fullName": "Daniel Truong", + "picture": "daniel-truong.webp", + "positions": { + "S22": [{ "title": "Dev Project Manager", "tier": 18 }], + "F22": [{ "title": "Dev Project Manager", "tier": 18 }], + "S23": [{ "title": "Dev Project Manager", "tier": 18 }], + "F23": [{ "title": "Vice President", "tier": 1 }], + "S24": [ + { "title": "Vice President", "tier": 1 }, + { "title": "AI Officer", "tier": 21 } + ] + } + }, + { + "fullName": "Samuel Valls", + "picture": "samuel-valls.webp", + "positions": { + "S21": [{ "title": "Community Manager", "tier": 30 }], + "F21": [{ "title": "Create Officer", "tier": 16 }], + "S22": [{ "title": "Create Operations Manager", "tier": 15 }] + } + }, + { + "fullName": "Anthony Vences", + "picture": "anthony-vences.webp", + "positions": { + "F23": [{ "title": "AI Officer", "tier": 21 }], + "S24": [{ "title": "AI Officer", "tier": 21 }] + } + }, + { + "fullName": "Cisco Velasquez", + "picture": "cisco-velasquez.webp", + "positions": { + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + } + }, + { + "fullName": "Karnikaa Velumani", + "picture": "karnikaa-velumani.webp", + "positions": { + "F21": [{ "title": "Vice President", "tier": 1 }], + "S22": [{ "title": "Vice President", "tier": 1 }], + "F22": [{ "title": "President", "tier": 0 }], + "S23": [{ "title": "President", "tier": 0 }], + "F23": [{ "title": "Open Source Software Co-TL", "tier": 32 }], + "S24": [{ "title": "Open Source Software Co-TL", "tier": 32 }] + } + }, + { + "fullName": "Kinsey Vo", + "picture": "kinsey-vo.webp", + "positions": { + "F23": [{ "title": "Marketing Officer", "tier": 9 }], + "S24": [{ "title": "Marketing Officer", "tier": 9 }] + } + }, + { + "fullName": "Rina Watanabe", + "picture": "rina-watanabe.webp", + "positions": { "F21": [{ "title": "Dev Project Manager", "tier": 18 }] } + }, + { + "fullName": "Kyle Whynott", + "picture": "kyle-whynott.webp", + "positions": { + "F23": [{ "title": "Secretary", "tier": 5 }], + "S24": [{ "title": "Secretary", "tier": 5 }] + } + }, + { + "fullName": "Jason Wong", + "picture": "jason-wong.webp", + "positions": { + "S22": [{ "title": "Historian", "tier": 7 }], + "F22": [{ "title": "Marketing Officer", "tier": 8 }] + } + }, + { + "fullName": "Cyril Youssef", + "picture": "cyril-youssef.webp", + "positions": { + "S23": [{ "title": "Algo Officer", "tier": 12 }], + "F23": [{ "title": "Algo Officer", "tier": 12 }], + "S24": [{ "title": "Algo Officer", "tier": 12 }], + "F24": [{ "title": "Algo Officer", "tier": 12 }], + "S25": [{ "title": "Algo Officer", "tier": 12 }] + }, + "discord": "@cyrily" + }, + { + "fullName": "Alexander Zavaleta", + "picture": "alexander-zavaleta.webp", + "positions": { + "S23": [{ "title": "AI Officer", "tier": 21 }], + "F23": [{ "title": "AI Officer", "tier": 21 }] + } + }, + { + "fullName": "Nick Goulart", + "picture": "nick-goulart.webp", + "positions": { + "F24": [ + { "title": "Dev Officer", "tier": 19 }, + { "title": "Server Team Member", "tier": 35 } + ] + }, + "discord": "@realbignick" + }, + { + "fullName": "Sarah Agnihotri", + "picture": "sarah-agnihotri.webp", + "positions": { + "F24": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@sarah8r" + }, + { + "fullName": "Yves Velasquez Vega", + "picture": "yves-velasquez-vega.webp", + "positions": { + "F24": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@hallowsyves" + }, + { + "fullName": "Teresa To", + "picture": "teresa-to.webp", + "positions": { + "F24": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@craziderpy" + }, + { + "fullName": "Mariia Grushina", + "picture": "mariia-grushina.webp", + "positions": { + "F24": [{ "title": "Algo Officer", "tier": 12 }], + "S25": [{ "title": "Algo Officer", "tier": 12 }] + }, + "discord": "@marynash_" + }, + { + "fullName": "Braedon Collet", + "picture": "placeholder.webp", + "positions": { + "F24": [{ "title": "AI Officer", "tier": 21 }], + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@python.programmer" + }, + { + "fullName": "Tyler Lui", + "picture": "tyler-lui.webp", + "positions": { + "F24": [{ "title": "Open Source Software Officer", "tier": 33 }], + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@slat._" + }, + { + "fullName": "Kenny Garcia", + "picture": "kenny-garcia.webp", + "positions": { + "F24": [{ "title": "AI Officer", "tier": 21 }], + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@kenny8092" + }, + { + "fullName": "Elizabeth Mazuca", + "picture": "elizabeth-mazuca.webp", + "positions": { + "F24": [{ "title": "Design Officer", "tier": 16 }] + }, + "discord": "@elzies" + }, + { + "fullName": "Chris Liwanag", + "picture": "chris-liwanag.webp", + "positions": { + "F24": [{ "title": "Game Dev Officer", "tier": 23 }], + "S25": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@quisyo" + }, + { + "fullName": "Syon Chau", + "picture": "syon-chau.webp", + "positions": { + "F24": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@poe" + }, + { + "fullName": "Kourosh Alasti", + "picture": "kourosh-alasti.webp", + "positions": { + "F24": [{ "title": "Dev Officer", "tier": 19 }], + "S25": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@alastiaf" + }, + { + "fullName": "Katherine Sutandar", + "picture": "katherine-sutandar.webp", + "positions": { + "F24": [{ "title": "Game Dev Officer", "tier": 23 }] + }, + "discord": "@kathoy" + }, + { + "fullName": "Alexander Peras", + "picture": "alexander-peras.webp", + "positions": { + "F24": [{ "title": "Open Source Software Officer", "tier": 33 }], + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@drafte" + }, + { + "fullName": "Jeffrey Rivera", + "picture": "jeffrey-rivera.webp", + "positions": { + "F24": [{ "title": "Design Officer", "tier": 16 }], + "S25": [{ "title": "Design Officer", "tier": 16 }] + }, + "discord": "@cheppies" + }, + { + "fullName": "Hoang Nguyen", + "picture": "hoang-nguyen.webp", + "positions": { + "F24": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@__panda3004" + }, + { + "fullName": "Ahad Munir Ahmad", + "picture": "ahad-munir-ahmad.webp", + "positions": { + "F24": [{ "title": "Dev Project Manager", "tier": 18 }], + "S25": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@adj1200" + }, + { + "fullName": "A.J. Galliguez", + "picture": "aj-galliguez.webp", + "positions": { + "F24": [{ "title": "Marketing Officer", "tier": 9 }], + "S25": [ + { "title": "Design Officer", "tier": 16 }, + { "title": "Marketing Officer", "tier": 9 } + ] + }, + "discord": "@ajareyouthere" + }, + { + "fullName": "Noah Scott", + "picture": "noah-scott.webp", + "positions": { + "F24": [{ "title": "Marketing Officer", "tier": 9 }], + "S25": [ + { "title": "Algo Officer", "tier": 12 }, + { "title": "Marketing Officer", "tier": 9 } + ] + }, + "discord": "@0100.1110" + }, + { + "fullName": "Hannah Minji Park", + "picture": "hannah-minji-park.webp", + "positions": { + "F24": [{ "title": "Marketing Officer", "tier": 9 }], + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@wiseeisw_99756" + }, + { + "fullName": "Isla Kim", + "picture": "isla-kim.webp", + "positions": { + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@chanran_1229" + }, + { + "fullName": "Siddharth Vasu", + "picture": "siddharth-vasu.webp", + "positions": { + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@prince_sidon" + }, + { + "fullName": "Nestor Reategui", + "picture": "nestor-reategui.webp", + "positions": { + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@nestiray" + }, + { + "fullName": "Joshua Holman", + "picture": "joshua-holman.webp", + "positions": { + "S25": [{ "title": "Open Source Software Officer", "tier": 33 }] + }, + "discord": "@thejolman" + }, + { + "fullName": "Talhah Raheem", + "picture": "talhah-raheem.webp", + "positions": { + "S25": [{ "title": "Dev Officer", "tier": 19 }] + }, + "discord": "@arrow5566" + }, + { + "fullName": "Kevin Geier-Conney", + "picture": "kevin-geier-conney.webp", + "positions": { + "S25": [{ "title": "Algo Officer", "tier": 12 }] + }, + "discord": "@iunk" + }, + { + "fullName": "Christian Huerta", + "picture": "christian-huerta.webp", + "positions": { + "S25": [{ "title": "Design Officer", "tier": 16 }] + }, + "discord": "@swiftpup121" + }, + { + "fullName": "Timothy Ou", + "picture": "timothy-ou.webp", + "positions": { + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@timothyou" + }, + { + "fullName": "Gage Ashbaugh", + "picture": "gage-ashbaugh.webp", + "positions": { + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@ashbox" + }, + { + "fullName": "Nathan Choi", + "picture": "nathan-choi.webp", + "positions": { + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@nchoi123" + }, + { + "fullName": "Eileen Nguyen", + "picture": "eileen-nguyen.webp", + "positions": { + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@tealixia" + }, + { + "fullName": "Ender Batu Demirtaş", + "picture": "ender-batu.webp", + "positions": { + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@rothchild" + }, + { + "fullName": "Madeline Savoiu", + "picture": "madeline-savoiu.webp", + "positions": { + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@briuche" + }, + { + "fullName": "Sachin Lodhi", + "picture": "sachin-lodhi.webp", + "positions": { + "S25": [{ "title": "AI Officer", "tier": 21 }] + }, + "discord": "@teradyne_" + }, + { + "fullName": "Angel Gaspar", + "picture": "angel-gaspar.webp", + "positions": { + "S25": [{ "title": "Marketing Officer", "tier": 9 }] + }, + "discord": "@qasple" + }, + { + "fullName": "Demi Chen", + "picture": "demi-chen.webp", + "positions": { + "S25": [{ "title": "Node Buds Officer", "tier": 26 }] + }, + "discord": "@hungry52" + } + ] \ No newline at end of file diff --git a/internal/db/populatescript.go b/internal/db/populatescript.go new file mode 100644 index 0000000..d94a842 --- /dev/null +++ b/internal/db/populatescript.go @@ -0,0 +1,128 @@ +package main + +import ( + "database/sql" + "encoding/json" + "fmt" + "log" + "os" + "strings" + + _ "github.com/mattn/go-sqlite3" +) + +type Officer struct { + FullName string `json:"fullName"` + Picture string `json:"picture"` + Positions map[string][]struct { + Title string `json:"title"` + Tier int `json:"tier"` + } `json:"positions"` + Discord string `json:"discord,omitempty"` +} + +func main() { + //Read JSON + data, err := os.ReadFile("officers.json") + if err != nil { + log.Fatal("Error reading JSON file:", err) + } + + var officers []Officer + err = json.Unmarshal(data, &officers) + if err != nil { + log.Fatal("Error unmarshaling JSON:", err) + } + + // Open SQLite database + db, err := sql.Open("sqlite3", "./officers.db") + if err != nil { + log.Fatal("Error opening database:", err) + } + defer db.Close() + + // Create tables if they don't exist + _, err = db.Exec(` + CREATE TABLE IF NOT EXISTS officers ( + uuid CHAR(4) PRIMARY KEY, + full_name VARCHAR(30) NOT NULL, + picture VARCHAR(37), + github VARCHAR(64), + discord VARCHAR(32) + ); + + CREATE TABLE IF NOT EXISTS tiers ( + tier INT PRIMARY KEY, + title VARCHAR(40), + t_index INT, + team VARCHAR(20) + ); + + CREATE TABLE IF NOT EXISTS positions ( + oid CHAR(4) NOT NULL, + semester CHAR(3) NOT NULL, + tier INT NOT NULL, + PRIMARY KEY (oid, semester, tier), + CONSTRAINT fk_officers FOREIGN KEY (oid) REFERENCES officers (uuid), + CONSTRAINT fk_tiers FOREIGN KEY (tier) REFERENCES tiers(tier) + ); + `) + if err != nil { + log.Fatal("Error creating tables:", err) + } + + // Prepare statements for inserting data + officerStmt, err := db.Prepare("INSERT OR IGNORE INTO officers (uuid, full_name, picture, discord) VALUES (?, ?, ?, ?)") + if err != nil { + log.Fatal("Error preparing officer statement:", err) + } + defer officerStmt.Close() + + tierStmt, err := db.Prepare("INSERT OR IGNORE INTO tiers (tier, title) VALUES (?, ?)") + if err != nil { + log.Fatal("Error preparing tier statement:", err) + } + defer tierStmt.Close() + + positionStmt, err := db.Prepare("INSERT OR IGNORE INTO positions (oid, semester, tier) VALUES (?, ?, ?)") + if err != nil { + log.Fatal("Error preparing position statement:", err) + } + defer positionStmt.Close() + + // Process each officer with sequential ID + for i, officer := range officers { + // Generate sequential 4-digit ID (0001, 0002, etc.) + sequentialID := fmt.Sprintf("%04d", i+1) + + // Insert officer + _, err = officerStmt.Exec(sequentialID, officer.FullName, officer.Picture, officer.Discord) + if err != nil { + log.Printf("Error inserting officer %s: %v", officer.FullName, err) + continue + } + + // Process positions + for semester, positions := range officer.Positions { + for _, pos := range positions { + // Insert tier if it doesn't exist + _, err = tierStmt.Exec(pos.Tier, pos.Title) + if err != nil { + log.Printf("Error inserting tier %d for officer %s: %v", pos.Tier, officer.FullName, err) + continue + } + + // Insert position + _, err = positionStmt.Exec(sequentialID, strings.ToUpper(semester), pos.Tier) + if err != nil { + log.Printf("Error inserting position for officer %s: %v", officer.FullName, err) + continue + } + } + } + } + + fmt.Println("Database population completed successfully!") + fmt.Printf("Processed %d officers\n", len(officers)) + defer db.Close() // ← This should appear right after sql.Open() +} \ No newline at end of file diff --git a/internal/db/sql/schemas/schema.sql b/internal/db/sql/schemas/schema.sql index d8aa59a..232a017 100644 --- a/internal/db/sql/schemas/schema.sql +++ b/internal/db/sql/schemas/schema.sql @@ -48,8 +48,8 @@ CREATE TABLE IF NOT EXISTS positions ( tier INT NOT NULL, PRIMARY KEY (oid, semester, tier), - CONSTRAINT fk_officers FOREIGN KEY (oid) REFERENCES officer (uuid), - CONSTRAINT fk_tiers FOREIGN KEY (tier) REFERENCES branch (tier) + CONSTRAINT fk_officers FOREIGN KEY (oid) REFERENCES officers (uuid), + CONSTRAINT fk_tiers FOREIGN KEY (tier) REFERENCES tiers(tier) ); --- TODO: Create a table for access tokens for the API. +-- TODO: Create a table for access tokens for the API. \ No newline at end of file diff --git a/tmp/build-errors.log b/tmp/build-errors.log new file mode 100644 index 0000000..77d68f9 --- /dev/null +++ b/tmp/build-errors.log @@ -0,0 +1 @@ +exit status 2 \ No newline at end of file