Skip to content

Add support for defaults #2

@OKNoah

Description

@OKNoah
export default class User extends Model {
  static schema = {
    name: String,
    email: String,
    password: String,
    role: { $type: String, enum: ['ADMIN', 'USER'], default: 'USER' },

Also, perhaps there needs to be some consistency with the naming of options. $ before or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions