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 default date values #6

Open
yawetse opened this issue Jul 7, 2017 · 0 comments
Open

support default date values #6

yawetse opened this issue Jul 7, 2017 · 0 comments
Assignees

Comments

@yawetse
Copy link
Member

yawetse commented Jul 7, 2017

@janbialostok test a schema with default timestamps:

const lowkie = require('lowkie');
const Schema = lowkie.Schema;
const tempSchema= lowkie.Schema({
  name: String,
  custom_attrs: Schema.Types.Mixed;
  createdat: {
    type: Date,
    'default': Date.now,
  },
  updatedat: {
    type: Date,
    'default': Date.now,
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants