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

feat: support class static attributes #131

Merged
merged 5 commits into from
Jul 5, 2021
Merged

Conversation

cyjake
Copy link
Owner

@cyjake cyjake commented Jul 5, 2021

class User extends Bone {
  static attributes = {}
  static beforeCreate(obj) {
  }
  static initialize() {
    this.hasMany('posts');
  }
}
  • deprecated Bone.describe(), migrating to Bone.initialize().
  • renamed Bone.aliasName to Bone.tableAlias, which is an internal property

index.js Outdated Show resolved Hide resolved
```js
class User extends Bone {
  static attributes = {}
}
```
src/bone.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
src/bone.js Outdated Show resolved Hide resolved
@JimmyDaddy JimmyDaddy self-requested a review July 5, 2021 12:17
@JimmyDaddy JimmyDaddy merged commit d287e01 into master Jul 5, 2021
@cyjake cyjake deleted the feat-static-attributes branch July 15, 2021 18:21
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

Successfully merging this pull request may close these issues.

2 participants