fix: use new assignData method for default data
This commit is contained in:
parent
8be1f81848
commit
8416b1f448
34 changed files with 317 additions and 615 deletions
|
|
@ -7,12 +7,10 @@ export interface IUserNamespace extends UserShareBaseModel {
|
|||
|
||||
// This class extends the user share model with a 'rights' parameter which is used in sharing
|
||||
export default class UserNamespaceModel extends UserShareBaseModel implements IUserNamespace {
|
||||
namespaceId!: INamespace['id']
|
||||
namespaceId: INamespace['id'] = 0
|
||||
|
||||
defaults() {
|
||||
return {
|
||||
...super.defaults(),
|
||||
namespaceId: 0,
|
||||
}
|
||||
constructor(data: Partial<IUserNamespace>) {
|
||||
super(data)
|
||||
this.assignData(data)
|
||||
}
|
||||
}
|
||||
Reference in a new issue