1
0

Added link sharing (#30)

This commit is contained in:
konrad
2019-09-09 17:55:43 +00:00
committed by Gitea
parent 857c283fb7
commit d83fb24bbd
18 changed files with 397 additions and 41 deletions

View File

@ -0,0 +1,5 @@
{
"UNKNOWN": 0,
"USER": 1,
"LINK_SHARE": 2
}

27
src/models/linkShare.js Normal file
View File

@ -0,0 +1,27 @@
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)
}
// Default attributes that define the "empty" state.
defaults() {
return {
id: 0,
hash: '',
right: 0,
shared_by: UserModel,
sharing_type: 0,
listID: 0,
created: 0,
updated: 0,
}
}
}