feat: improve store and model typing
This commit is contained in:
@ -1,18 +1,31 @@
|
||||
import AbstractModel from './abstractModel'
|
||||
import UserModel from './user'
|
||||
import AbstractModel, { type IAbstract } from './abstractModel'
|
||||
import UserModel, { type IUser } from './user'
|
||||
import {RIGHTS, type Right} from '@/models/constants/rights'
|
||||
|
||||
export default class LinkShareModel extends AbstractModel {
|
||||
export interface ILinkShare extends IAbstract {
|
||||
id: number
|
||||
hash: string
|
||||
right: Right
|
||||
sharedBy: UserModel
|
||||
sharedBy: IUser
|
||||
sharingType: number // FIXME: use correct numbers
|
||||
listId: number
|
||||
name: string
|
||||
password: string
|
||||
created: Date
|
||||
updated: Date
|
||||
}
|
||||
|
||||
export default class LinkShareModel extends AbstractModel implements ILinkShare {
|
||||
declare id: number
|
||||
declare hash: string
|
||||
declare right: Right
|
||||
sharedBy: IUser
|
||||
declare sharingType: number // FIXME: use correct numbers
|
||||
declare listId: number
|
||||
declare name: string
|
||||
declare password: string
|
||||
created: Date
|
||||
updated: Date
|
||||
|
||||
constructor(data) {
|
||||
// The constructor of AbstractModel handles all the default parsing.
|
||||
|
Reference in New Issue
Block a user