updated old documentation
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a123145acd
commit
e1056f4ade
@ -0,0 +1,38 @@
|
|||||||
|
@startuml
|
||||||
|
class EditorController {
|
||||||
|
+__construct (model : TacticModel)
|
||||||
|
+ openEditorFor(tactic:TacticInfo): ViewHttpResponse
|
||||||
|
+ createNew(): ViewHttpResponse
|
||||||
|
+ openTestEditor(courtType:CourtType): ViewHttpResponse
|
||||||
|
+ createNewOfKind(type:CourtType, session:SessionHandle): ViewHttpResponse
|
||||||
|
+ openEditor(id:int, session:SessionHandle): ViewHttpResponse
|
||||||
|
}
|
||||||
|
EditorController *-- "- model" TacticModel
|
||||||
|
|
||||||
|
class TacticModel {
|
||||||
|
+ TACTIC_DEFAULT_NAME:int {static}{frozen}
|
||||||
|
+ __construct(tactics : TacticInfoGateway)
|
||||||
|
+ makeNew(name:string, ownerId:int, type:CourtType): TacticInfo
|
||||||
|
+ makeNewDefault(ownerId:int, type:CourtType): ?TacticInfo
|
||||||
|
+ get(id:int): ?TacticInfo
|
||||||
|
+ getLast(nb:int, ownerId:int): array
|
||||||
|
+ getAll(ownerId:int): ?array
|
||||||
|
+ updateName(id:int, name:string, authId:int): array
|
||||||
|
+ updateContent(id:int, json:string): ?ValidationFail
|
||||||
|
}
|
||||||
|
|
||||||
|
TacticModel *-- "- tactics" TacticInfoGateway
|
||||||
|
|
||||||
|
class TacticInfoGateway{
|
||||||
|
+ __construct(con : Connexion)
|
||||||
|
+ get(id:int): ?TacticInfo
|
||||||
|
+ getLast(nb:int, ownerId:int): ?array
|
||||||
|
+ getAll(ownerId:int): ?array
|
||||||
|
+ insert(name:string, owner:int, type:CourtType): int
|
||||||
|
+ updateName(id:int, name:string): bool
|
||||||
|
+ updateContent(id:int, json:string): bool
|
||||||
|
}
|
||||||
|
|
||||||
|
TacticInfoGateway *--"- con" Connexion
|
||||||
|
|
||||||
|
@enduml
|
@ -1,63 +1,87 @@
|
|||||||
@startuml
|
@startuml
|
||||||
class Team {
|
|
||||||
- name: string
|
|
||||||
- picture: Url
|
|
||||||
- members: array<int, MemberRole>
|
|
||||||
|
|
||||||
+ __construct(name : string, picture : string, mainColor : Colo, secondColor : Color)
|
|
||||||
+ getName(): string
|
|
||||||
+ getPicture(): Url
|
|
||||||
+ getMainColor(): Color
|
|
||||||
+ getSecondColor(): Color
|
|
||||||
+ listMembers(): array<Member>
|
|
||||||
}
|
|
||||||
|
|
||||||
Team --> "- mainColor" Color
|
|
||||||
Team --> "- secondColor" Color
|
|
||||||
|
|
||||||
class Color {
|
|
||||||
- value: string
|
|
||||||
- __construct(value : string)
|
|
||||||
+ getValue(): string
|
|
||||||
+ from(value: string): Color
|
|
||||||
+ tryFrom(value : string) : ?Color
|
|
||||||
}
|
|
||||||
|
|
||||||
class TeamGateway{
|
class TeamGateway{
|
||||||
--
|
|
||||||
+ __construct(con : Connexion)
|
+ __construct(con : Connexion)
|
||||||
+ insert(name : string ,picture : string, mainColor : Color, secondColor : Color)
|
+ insert(name : string ,picture : string, mainColor : Color, secondColor : Color)
|
||||||
+ listByName(name : string): array
|
+ listByName(name : string): array
|
||||||
|
+ getTeamById(id:int): ?TeamInfo
|
||||||
|
+ getTeamIdByName(name:string): ?int
|
||||||
|
+ deleteTeam(idTeam:int): void
|
||||||
|
+ editTeam(idTeam:int, newName:string, newPicture:string, newMainColor:string, newSecondColor:string)
|
||||||
|
+ getAll(user:int): array
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamGateway *--"- con" Connexion
|
TeamGateway *--"- con" Connexion
|
||||||
TeamGateway ..> Color
|
|
||||||
|
|
||||||
|
class MemberGateway{
|
||||||
|
|
||||||
|
+ __construct(con : Connexion)
|
||||||
|
+ insert(idTeam:int, userId:int, role:string): void
|
||||||
|
+ getMembersOfTeam(teamId:int): array
|
||||||
|
+ remove(idTeam:int, idMember:int): void
|
||||||
|
+ isCoach(email:string, idTeam:int): bool
|
||||||
|
+ isMemberOfTeam(idTeam:int, idCurrentUser:int): bool
|
||||||
|
}
|
||||||
|
|
||||||
|
MemberGateway *--"- con" Connexion
|
||||||
|
|
||||||
|
class AccountGateway{
|
||||||
|
+ __construct(con : Connexion)
|
||||||
|
+ insertAccount(name:string, email:string, token:string, hash:string, profilePicture:string): int
|
||||||
|
+ getRowsFromMail(email:string): ?array
|
||||||
|
+ getHash(email:string): ?string
|
||||||
|
+ exists(email:string): bool
|
||||||
|
+ getAccountFromMail(email:string): ?Account
|
||||||
|
+ getAccountFromToken(token:string): ?Account
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountGateway *--"- con" Connexion
|
||||||
|
|
||||||
class TeamModel{
|
class TeamModel{
|
||||||
---
|
|
||||||
+ __construct(gateway : TeamGateway)
|
+ __construct(gateway : TeamGateway)
|
||||||
+ createTeam(name : string,picture : string, mainColorValue : int, secondColorValue : int, errors : array)
|
+ createTeam(name : string,picture : string, mainColorValue : int, secondColorValue : int, errors : array)
|
||||||
|
+ addMember(mail:string, teamId:int, role:string): int
|
||||||
+ listByName(name : string ,errors : array) : ?array
|
+ listByName(name : string ,errors : array) : ?array
|
||||||
+ displayTeam(id : int): Team
|
+ getTeam(idTeam:int, idCurrentUser:int): ?Team
|
||||||
|
+ deleteMember(idMember:int, teamId:int): int
|
||||||
|
+ deleteTeam(email:string, idTeam:int): int
|
||||||
|
+ isCoach(idTeam:int, email:string): bool
|
||||||
|
+ editTeam(idTeam:int, newName:string, newPicture:string, newMainColor:string, newSecondColor:string)
|
||||||
|
+ getAll(user:int): array
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamModel *--"- gateway" TeamGateway
|
TeamModel *--"- members" MemberGateway
|
||||||
TeamModel ..> Team
|
TeamModel *--"- teams" TeamGateway
|
||||||
TeamModel ..> Color
|
TeamModel *--"- teams" AccountGateway
|
||||||
|
|
||||||
|
|
||||||
class TeamController{
|
class TeamController{
|
||||||
- twig : Environement
|
+ __construct( model : TeamModel)
|
||||||
--
|
+ displayCreateTeam(session:SessionHandle): ViewHttpResponse
|
||||||
+ __construct( model : TeamModel, twig : Environement)
|
+ displayDeleteMember(session:SessionHandle): ViewHttpResponse
|
||||||
+ displaySubmitTeam() : HttpResponse
|
+ submitTeam(request:array, session:SessionHandle): HttpResponse
|
||||||
+ submitTeam(request : array) : HttpResponse
|
+ displayListTeamByName(session:SessionHandle): ViewHttpResponse
|
||||||
+ displayListTeamByName(): HttpResponse
|
+ listTeamByName(request:array, session:SessionHandle): HttpResponse
|
||||||
+ listTeamByName(request : array) : HttpResponse
|
+ deleteTeamById(id:int, session:SessionHandle): HttpResponse
|
||||||
+ displayTeam(id : int): HttpResponse
|
+ displayTeam(id:int, session:SessionHandle): ViewHttpResponse
|
||||||
|
+ displayAddMember(idTeam:int, session:SessionHandle): ViewHttpResponse
|
||||||
|
+ addMember(idTeam:int, request:array, session:SessionHandle): HttpResponse
|
||||||
|
+ deleteMember(idTeam:int, idMember:int, session:SessionHandle): HttpResponse
|
||||||
|
+ displayEditTeam(idTeam:int, session:SessionHandle): ViewHttpResponse
|
||||||
|
+ editTeam(idTeam:int, request:array, session:SessionHandle): HttpResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamController *--"- model" TeamModel
|
TeamController *--"- model" TeamModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Connexion { }
|
class Connexion { }
|
||||||
|
|
||||||
@enduml
|
@enduml
|
Loading…
Reference in new issue