TiBianMod / vuex-orm-decorators

Decorator Syntax for Vuex ORM for better type safety.
MIT License
29 stars 11 forks source link

UID Type missing #7

Closed sarim closed 4 years ago

sarim commented 4 years ago
class User extends Model {
  static entity = 'users'

  static fields () {
    return {
      id: this.uid(() => uuid())
    }
  }
}

Seems like there is no UidField decorator?

sarim commented 4 years ago

After reading the source I see other decorators are ultimately calling the Field(Model...... So tried that way.

  @Field(Model.uid(() => uuid()))

this works. But obviously should have a @UidField decorator too.

Scotley commented 4 years ago

Yup, fair call. I must have missed that one. Merged, thanks for the input!

sarim commented 4 years ago

@Scotley I think the auto-publish to npm action isn't working bcz the version number haven't been increased in package.json. Can you check that please?

Scotley commented 4 years ago

Apologies, I have fixed the issue and npm is now on the correct version.