Todos service
This commit is contained in:
16
packages/common/src/data/Todo.ts
Normal file
16
packages/common/src/data/Todo.ts
Normal 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,
|
||||
}) {}
|
||||
1
packages/common/src/data/index.ts
Normal file
1
packages/common/src/data/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./Todo"
|
||||
Reference in New Issue
Block a user