Todos service

This commit is contained in:
Julien Valverdé
2024-06-27 10:35:52 +02:00
parent d6517365a7
commit 3dbb465500
10 changed files with 74 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { Schema as S } from "@effect/schema"
import { Tag } from "@thilawyn/thilalib/effect/schema"
import { Class } from "@thilawyn/thilalib/effect/schema/class"
export class Todo extends Class<Todo>("Todo")({
_tag: Tag("Todo"),
id: S.String,
title: S.String,
content: S.String,
due: S.optional(S.DateFromSelf, { as: "Option" }),
createdAt: S.DateFromSelf,
updatedAt: S.DateFromSelf,
}) {}