Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support standard date fields #27

Open
zygopleural opened this issue Sep 30, 2022 · 0 comments
Open

Support standard date fields #27

zygopleural opened this issue Sep 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@zygopleural
Copy link
Contributor

At the moment, if I want to store just a date, I need to do:

const Report = createModel((Report) => {
  model
    .string("id", { id: true })
    .dateTime("reportDate", { raw: "@database.Date" })
})

It would be nice to be able to have something like

const Report = createModel((Report) => {
  model
    .string("id", { id: true })
    .date("reportDate")
})

which would automatically add the "@database.Date" .

This is more of a nice to have, and completely understandable that you might want to just support native PostgreSQL types.

This could equally be implemented with a custom function (presumably).

@ridafkih ridafkih added the enhancement New feature or request label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants