-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
638 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
migrations/schemas/20240502144255-create_discord_events.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- +migrate Up | ||
CREATE TABLE events ( | ||
id uuid PRIMARY KEY DEFAULT (uuid()), | ||
name TEXT NOT NULL, | ||
description TEXT, | ||
date TIMESTAMP(6), | ||
discord_event_id VARCHAR, | ||
discord_channel_id VARCHAR, | ||
discord_message_id VARCHAR, | ||
discord_creator_id VARCHAR, | ||
event_type VARCHAR, | ||
created_at TIMESTAMP(6) DEFAULT (now()), | ||
updated_at TIMESTAMP(6) DEFAULT (now()), | ||
deleted_at TIMESTAMP(6) DEFAULT NULL | ||
); | ||
|
||
CREATE TABLE event_speakers ( | ||
event_id UUID NOT NULL, | ||
discord_account_id UUID NOT NULL, | ||
topic TEXT, | ||
UNIQUE (event_id, discord_account_id) | ||
); | ||
|
||
ALTER TABLE event_speakers | ||
ADD CONSTRAINT event_speakers_discord_event_id_fkey FOREIGN KEY (event_id) REFERENCES events (id); | ||
|
||
ALTER TABLE event_speakers | ||
ADD CONSTRAINT event_speakers_discord_account_id_fkey FOREIGN KEY (discord_account_id) REFERENCES discord_accounts (id); | ||
|
||
-- +migrate Down | ||
|
||
DROP TABLE event_speakers; | ||
DROP TABLE events; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package constant | ||
|
||
const ( | ||
RegexPatternDiscordChannelID = `<#(\d+)>` | ||
RegexPatternDiscordID = `<@(\d+)>` | ||
RegexPatternEmail = `\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+\b` | ||
RegexPatternIcyReward = ` (\d+)` | ||
RegexPatternNumber = `\d{18,}` | ||
RegexPatternUrl = `((?:https?://)[^\s]+)` | ||
RegexPatternGithub = `gh:(\w+)` | ||
RegexPatternDescription = `d:"(.*?)"` | ||
RegexPatternTime = `t:(\w+)` | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.