2019-09-09 17:55:43 +00:00
|
|
|
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)
|
|
|
|
|
2020-04-12 21:54:46 +00:00
|
|
|
this.sharedBy = new UserModel(this.sharedBy)
|
2020-02-08 13:16:06 +00:00
|
|
|
|
|
|
|
this.created = new Date(this.created)
|
|
|
|
this.updated = new Date(this.updated)
|
2019-09-09 17:55:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Default attributes that define the "empty" state.
|
|
|
|
defaults() {
|
|
|
|
return {
|
|
|
|
id: 0,
|
|
|
|
hash: '',
|
|
|
|
right: 0,
|
2020-04-12 21:54:46 +00:00
|
|
|
sharedBy: UserModel,
|
|
|
|
sharingType: 0,
|
2019-09-09 17:55:43 +00:00
|
|
|
listID: 0,
|
|
|
|
|
2020-02-08 13:16:06 +00:00
|
|
|
created: null,
|
|
|
|
updated: null,
|
2019-09-09 17:55:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|