all: Aggiunte varie feature e riscritte svariate cose

This commit is contained in:
2022-12-01 03:45:29 +01:00
parent bd055f484d
commit 8fdef2981d
22 changed files with 714 additions and 422 deletions
+4 -1
View File
@@ -2,7 +2,7 @@
// Common
//
export type MetadataProps = 'id' | 'createdAt'
export type MetadataProps = 'id' | 'createdAt' | 'deleted'
export type Opaque<T, K, L extends string = 'opaque'> = T & { _: K; __: L }
export type Id<T> = Opaque<string, T, 'id'>
@@ -41,7 +41,9 @@ export type ProblemId = Id<Problem>
export type Problem = {
id: ProblemId
createdAt: string
deleted: boolean
title: string
content: string
createdBy: UserId
}
@@ -57,6 +59,7 @@ export type SolutionId = Id<Solution>
export type Solution = {
id: SolutionId
createdAt: string
deleted: boolean
sentBy: UserId
forProblem: ProblemId