1
0

chore: move frontend files

This commit is contained in:
kolaente
2024-02-07 14:56:56 +01:00
parent 447641c222
commit fc4676315d
606 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,34 @@
import AbstractModel from './abstractModel'
import UserModel from './user'
import TeamMemberModel from './teamMember'
import {RIGHTS, type Right} from '@/constants/rights'
import type {ITeam} from '@/modelTypes/ITeam'
import type {ITeamMember} from '@/modelTypes/ITeamMember'
import type {IUser} from '@/modelTypes/IUser'
export default class TeamModel extends AbstractModel<ITeam> implements ITeam {
id = 0
name = ''
description = ''
members: ITeamMember[] = []
right: Right = RIGHTS.READ
createdBy: IUser = {} // FIXME: seems wrong
created: Date = null
updated: Date = null
constructor(data: Partial<ITeam> = {}) {
super()
this.assignData(data)
// Make the members to usermodels
this.members = this.members.map(m => {
return new TeamMemberModel(m)
})
this.createdBy = new UserModel(this.createdBy)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
}