-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add auth routes and login/register pages
- Loading branch information
Showing
15 changed files
with
384 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
CREATE TABLE "User" ( | ||
CREATE TABLE users ( | ||
id SERIAL PRIMARY KEY, | ||
email VARCHAR(255) UNIQUE, | ||
name VARCHAR(255), | ||
name VARCHAR(255) UNIQUE, | ||
password VARCHAR(255), | ||
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
CREATE TABLE "Links" ( | ||
CREATE TABLE links ( | ||
id SERIAL PRIMARY KEY, | ||
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
original_url VARCHAR(255), | ||
short_url VARCHAR(255), | ||
userId INTEGER REFERENCES "User"(id) ON DELETE SET NULL | ||
userId INTEGER REFERENCES users (id) ON DELETE SET NULL | ||
); | ||
CREATE TABLE "QRCodes" ( | ||
CREATE TABLE qrcodes ( | ||
id SERIAL PRIMARY KEY, | ||
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
qr_code TEXT, | ||
userId INTEGER REFERENCES "User"(id) ON DELETE SET NULL | ||
userId INTEGER REFERENCES users (id) ON DELETE SET NULL | ||
); |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
CREATE TABLE LinkClicks ( | ||
CREATE TABLE linkclicks ( | ||
ID SERIAL PRIMARY KEY, | ||
LinkID INTEGER REFERENCES "Links"(id) ON DELETE CASCADE, | ||
LinkID INTEGER REFERENCES links(id) ON DELETE CASCADE, | ||
ClickTimestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
IPAddress VARCHAR(255), | ||
UserAgent TEXT, | ||
Referrer TEXT, | ||
DeviceInfo TEXT, | ||
GeographicLocation VARCHAR(255), | ||
UserID INTEGER REFERENCES "User"(id) ON DELETE SET NULL, | ||
UserID INTEGER REFERENCES users (id) ON DELETE SET NULL, | ||
ClickCount INTEGER | ||
); | ||
; |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod user_routes; | ||
pub mod web_routes; | ||
pub mod link_routes; | ||
pub mod auth_routes; |
Oops, something went wrong.