frontend/src/models/linkShare.js
konrad b35c2d6f2c Add names to link shares when creating them (#456)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/frontend#456
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-04-07 12:44:54 +00:00

31 lines
601 B
JavaScript

import AbstractModel from './abstractModel'
import UserModel from './user'
export default class ListModel extends AbstractModel {
constructor(data) {
// The constructor of AbstractModel handles all the default parsing.
super(data)
this.sharedBy = new UserModel(this.sharedBy)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
// Default attributes that define the "empty" state.
defaults() {
return {
id: 0,
hash: '',
right: 0,
sharedBy: UserModel,
sharingType: 0,
listId: 0,
name: '',
created: null,
updated: null,
}
}
}