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
kolaente 161f853361
All checks were successful
continuous-integration/drone/push Build is passing
Make sure to use date objects everywhere where dealing with dates
2020-02-08 14:16:06 +01:00

30 lines
721 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.shared_by = new UserModel(this.shared_by)
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,
shared_by: UserModel,
sharing_type: 0,
listID: 0,
created: null,
updated: null,
}
}
}