Issue with `Model.DateTimeInsertFromDate` Not Making Fields Optional

Why does Model.DateTimeInsertFromDate does not make the field optional on the .insert schema?

For some reason I have to pass undefined to the overridable columns:

export const InboxLive = InboxRpc.toLayer(
    Effect.gen(function* () {
        const db = yield* InboxEntriesRepository;

        return {
            CreateInboxEntry: ({ content }) =>
                db.create({ content, createdAt: undefined, updatedAt: undefined }),
            GetInboxEntries: () => Stream.fromIterableEffect(db.findMany()),
        };
    }),
).pipe(Layer.provide(InboxEntriesRepository.Default));
Was this page helpful?