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/teamShareBase.ts

24 lines
544 B
TypeScript

import AbstractModel from './abstractModel'
import {RIGHTS, type Right} from '@/models/constants/rights'
/**
* 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 {
constructor(data) {
super(data)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
defaults() {
return {
teamId: 0,
right: RIGHTS.READ,
created: null,
updated: null,
}
}
}