This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/models/linkShare.js

30 lines
588 B
JavaScript
Raw Normal View History

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)
2019-09-09 17:55:43 +00:00
this.sharedBy = new UserModel(this.sharedBy)
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,
sharedBy: UserModel,
sharingType: 0,
listId: 0,
2019-09-09 17:55:43 +00:00
created: null,
updated: null,
}
}
2019-09-09 17:55:43 +00:00
}