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/team.js
Dominik Pschenitschni 200851259a
Some checks failed
continuous-integration/drone/pr Build is failing
feat: remove defaults function
2022-01-06 15:38:02 +01:00

28 lines
571 B
JavaScript

import AbstractModel from './abstractModel'
import UserModel from './user'
import TeamMemberModel from './teamMember'
export default class TeamModel extends AbstractModel {
id = 0
name = ''
description = ''
members = []
right = 0
createdBy = {}
created = null
updated = null
constructor(data) {
super(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)
}
}