generated from nhcarrigan/template
feat: initial scaffolding
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export * from './lib/game.types';
|
||||
export * from './lib/book.types';
|
||||
export * from './lib/music.types';
|
||||
export * from './lib/auth.types';
|
||||
@@ -0,0 +1,20 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
username: string;
|
||||
avatarUrl?: string;
|
||||
discordId: string;
|
||||
}
|
||||
|
||||
export interface JwtPayload {
|
||||
sub: string; // user id
|
||||
email: string;
|
||||
username: string;
|
||||
iat?: number;
|
||||
exp?: number;
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
accessToken: string;
|
||||
user: User;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
export enum BookStatus {
|
||||
READING = 'READING',
|
||||
FINISHED = 'FINISHED',
|
||||
TO_READ = 'TO_READ',
|
||||
}
|
||||
|
||||
export interface Book {
|
||||
id: string;
|
||||
title: string;
|
||||
author: string;
|
||||
isbn?: string;
|
||||
status: BookStatus;
|
||||
dateAdded: Date;
|
||||
dateFinished?: 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;
|
||||
coverImage?: string;
|
||||
}
|
||||
|
||||
export interface UpdateBookDto extends Partial<CreateBookDto> {
|
||||
dateFinished?: Date;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
export enum GameStatus {
|
||||
PLAYING = 'PLAYING',
|
||||
COMPLETED = 'COMPLETED',
|
||||
BACKLOG = 'BACKLOG',
|
||||
}
|
||||
|
||||
export interface Game {
|
||||
id: string;
|
||||
title: string;
|
||||
platform?: string;
|
||||
status: GameStatus;
|
||||
dateAdded: Date;
|
||||
dateCompleted?: Date;
|
||||
rating?: number;
|
||||
notes?: string;
|
||||
coverImage?: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface CreateGameDto {
|
||||
title: string;
|
||||
platform?: string;
|
||||
status: GameStatus;
|
||||
rating?: number;
|
||||
notes?: string;
|
||||
coverImage?: string;
|
||||
}
|
||||
|
||||
export interface UpdateGameDto extends Partial<CreateGameDto> {
|
||||
dateCompleted?: Date;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
export enum MusicType {
|
||||
ALBUM = 'ALBUM',
|
||||
SINGLE = 'SINGLE',
|
||||
EP = 'EP',
|
||||
}
|
||||
|
||||
export enum MusicStatus {
|
||||
LISTENING = 'LISTENING',
|
||||
COMPLETED = 'COMPLETED',
|
||||
WANT_TO_LISTEN = 'WANT_TO_LISTEN',
|
||||
}
|
||||
|
||||
export interface Music {
|
||||
id: string;
|
||||
title: string;
|
||||
artist: string;
|
||||
type: MusicType;
|
||||
status: MusicStatus;
|
||||
dateAdded: Date;
|
||||
dateCompleted?: 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;
|
||||
coverArt?: string;
|
||||
}
|
||||
|
||||
export interface UpdateMusicDto extends Partial<CreateMusicDto> {
|
||||
dateCompleted?: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user