feat: scaffolding

This commit is contained in:
2026-02-03 12:55:49 -08:00
parent c8a82646f8
commit 8f3aeb9391
12 changed files with 190 additions and 111 deletions
+10 -1
View File
@@ -1,3 +1,9 @@
/**
* @copyright 2026 NHCarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface User {
id: string;
email: string;
@@ -7,7 +13,10 @@ export interface User {
}
export interface JwtPayload {
sub: string; // user id
/**
* User id.
*/
sub: string;
email: string;
username: string;
iat?: number;
+27 -21
View File
@@ -1,34 +1,40 @@
/**
* @copyright 2026 NHCarrigan
* @copyright 2026 NHCarrigan
* @license Naomi's Public License
*/
export enum BookStatus {
READING = 'READING',
FINISHED = 'FINISHED',
TO_READ = 'TO_READ',
reading = "READING",
finished = "FINISHED",
toRead = "TO_READ",
}
export interface Book {
id: string;
title: string;
author: string;
isbn?: string;
status: BookStatus;
dateAdded: Date;
id: string;
title: string;
author: string;
isbn?: string;
status: BookStatus;
dateAdded: Date;
dateFinished?: Date;
rating?: number;
notes?: string;
coverImage?: string;
createdAt: Date;
updatedAt: Date;
rating?: number;
notes?: string;
coverImage?: string;
createdAt: Date;
updatedAt: Date;
}
export interface CreateBookDto {
title: string;
author: string;
isbn?: string;
status: BookStatus;
rating?: number;
notes?: string;
title: string;
author: string;
isbn?: string;
status: BookStatus;
rating?: number;
notes?: string;
coverImage?: string;
}
export interface UpdateBookDto extends Partial<CreateBookDto> {
dateFinished?: Date;
}
}
+25 -19
View File
@@ -1,32 +1,38 @@
/**
* @copyright 2026 NHCarrigan
* @copyright 2026 NHCarrigan
* @license Naomi's Public License
*/
export enum GameStatus {
PLAYING = 'PLAYING',
COMPLETED = 'COMPLETED',
BACKLOG = 'BACKLOG',
playing = "PLAYING",
completed = "COMPLETED",
backlog = "BACKLOG",
}
export interface Game {
id: string;
title: string;
platform?: string;
status: GameStatus;
dateAdded: Date;
id: string;
title: string;
platform?: string;
status: GameStatus;
dateAdded: Date;
dateCompleted?: Date;
rating?: number;
notes?: string;
coverImage?: string;
createdAt: Date;
updatedAt: Date;
rating?: number;
notes?: string;
coverImage?: string;
createdAt: Date;
updatedAt: Date;
}
export interface CreateGameDto {
title: string;
platform?: string;
status: GameStatus;
rating?: number;
notes?: string;
title: string;
platform?: string;
status: GameStatus;
rating?: number;
notes?: string;
coverImage?: string;
}
export interface UpdateGameDto extends Partial<CreateGameDto> {
dateCompleted?: Date;
}
}
+30 -24
View File
@@ -1,40 +1,46 @@
/**
* @copyright 2026 NHCarrigan
* @copyright 2026 NHCarrigan
* @license Naomi's Public License
*/
export enum MusicType {
ALBUM = 'ALBUM',
SINGLE = 'SINGLE',
EP = 'EP',
album = "ALBUM",
single = "SINGLE",
ep = "EP",
}
export enum MusicStatus {
LISTENING = 'LISTENING',
COMPLETED = 'COMPLETED',
WANT_TO_LISTEN = 'WANT_TO_LISTEN',
listening = "LISTENING",
completed = "COMPLETED",
wantToListen = "WANT_TO_LISTEN",
}
export interface Music {
id: string;
title: string;
artist: string;
type: MusicType;
status: MusicStatus;
dateAdded: Date;
id: string;
title: string;
artist: string;
type: MusicType;
status: MusicStatus;
dateAdded: Date;
dateCompleted?: Date;
rating?: number;
notes?: string;
coverArt?: string;
createdAt: Date;
updatedAt: Date;
rating?: number;
notes?: string;
coverArt?: string;
createdAt: Date;
updatedAt: Date;
}
export interface CreateMusicDto {
title: string;
artist: string;
type: MusicType;
status: MusicStatus;
rating?: number;
notes?: string;
title: string;
artist: string;
type: MusicType;
status: MusicStatus;
rating?: number;
notes?: string;
coverArt?: string;
}
export interface UpdateMusicDto extends Partial<CreateMusicDto> {
dateCompleted?: Date;
}
}