Flesh-out model on the backend

This commit is contained in:
Szymon Nowakowski
2024-12-26 21:40:05 +01:00
parent 8e57a76e60
commit 1d2b19f072
6 changed files with 460 additions and 113 deletions

View File

@@ -3,8 +3,11 @@ import * as Brand from "./Brand";
export type UUID = Brand.Branded<string, "UUID">;
export const UUID = Brand.nominal<UUID>();
export type Sha256 = Brand.Branded<Uint8Array, "Sha256">;
export const Sha256 = Brand.nominal<Sha256>();
export type Sha256_Bin = Brand.Branded<Uint8Array, "Sha256">;
export const Sha256_Bin = Brand.nominal<Sha256_Bin>();
export type Sha256_Hex = Brand.Branded<string, "Sha256">;
export const Sha256_Hex = Brand.nominal<Sha256_Hex>();
export type AttachmentId = Brand.Branded<UUID, "AttachmentId">;
export const AttachmentId = Brand.nominal<AttachmentId>();