feat: improve store and model typing
This commit is contained in:
parent
c9e85cb52b
commit
3766b5e51b
98 changed files with 1050 additions and 507 deletions
|
|
@ -1,14 +1,22 @@
|
|||
import AbstractModel from './abstractModel'
|
||||
import type TeamModel from './team'
|
||||
import {RIGHTS, type Right} from '@/models/constants/rights'
|
||||
import type { ITeam } from './team'
|
||||
|
||||
export interface ITeamShareBase {
|
||||
teamId: ITeam['id']
|
||||
right: Right
|
||||
|
||||
created: Date
|
||||
updated: Date
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is a base class for common team sharing model.
|
||||
* It is extended in a way so it can be used for namespaces as well for lists.
|
||||
*/
|
||||
export default class TeamShareBaseModel extends AbstractModel {
|
||||
teamId: TeamModel['id']
|
||||
right: Right
|
||||
export default class TeamShareBaseModel extends AbstractModel implements ITeamShareBase {
|
||||
declare teamId: ITeam['id']
|
||||
declare right: Right
|
||||
|
||||
created: Date
|
||||
updated: Date
|
||||
|
|
|
|||
Reference in a new issue