parent
a23f785795
commit
d93b6d62f6
@ -0,0 +1,151 @@
|
||||
# Entities
|
||||
|
||||
## Qu'est ce qu'une entité ?
|
||||
|
||||
En programmation orientée objet, une entité, est une structure regroupant des données (attributs) qui caractérisent un concept particulier.
|
||||
|
||||
## Diagramme de classes
|
||||
|
||||
Le diagramme de classes est divisé en 3 parties pour plus de lisibilité.
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
|
||||
package Entities {
|
||||
class BlackListEntity{
|
||||
+ string Email
|
||||
+ DateOnly ExpirationDate
|
||||
+ BlackListEntity()
|
||||
+ BlackListEntity(string email, DateOnly expirationDate)
|
||||
}
|
||||
|
||||
class ContentLessonEntity{
|
||||
+ int LessonId
|
||||
+ LessonEntity Lesson
|
||||
+ int LessonPartId
|
||||
+ ParagraphEntity Paragraph
|
||||
|
||||
+ ContentLessonEntity()
|
||||
+ ContentLessonEntity(int lessonId, LessonEntity lesson, int lessonPartId, ParagraphEntity paragraph)
|
||||
}
|
||||
|
||||
class InquiryEntity{
|
||||
+ int Id
|
||||
+ string Title
|
||||
+ string Description
|
||||
+ bool IsUser
|
||||
+ InquiryTableEntity Database
|
||||
+ SolutionEntity InquiryTable
|
||||
+ InquiryEntity()
|
||||
+ InquiryEntity(int id)
|
||||
+ InquiryEntity(int id, string title, string description, bool isUser, InquiryTableEntity database, SolutionEntity inquiryTable)
|
||||
+ InquiryEntity(string title, string description, bool isUser, InquiryTableEntity database, SolutionEntity inquiryTable)
|
||||
}
|
||||
|
||||
class InquiryTableEntity{
|
||||
+ int OwnerId
|
||||
+ InquiryEntity Owner
|
||||
+ string DatabaseName
|
||||
+ string ConnectionInfo
|
||||
+ InquiryTableEntity()
|
||||
+ InquiryTableEntity(int inquiryId)
|
||||
+ InquiryTableEntity(int inquiryId, string databaseName, string connectionInfo)
|
||||
+ InquiryTableEntity(InquiryEntity owner, string databaseName, string connectionInfo)
|
||||
}
|
||||
}
|
||||
@enduml
|
||||
```
|
||||
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
package Entities {
|
||||
|
||||
class LessonEntity{
|
||||
+ int Id
|
||||
+ string? Title
|
||||
+ string? LastPublisher
|
||||
+ DateOnly? LastEdit
|
||||
+ LessonEntity()
|
||||
+ LessonEntity(int id)
|
||||
+ LessonEntity(int id, string title, string lastPublisher, DateOnly? lastEdit)
|
||||
+ LessonEntity(string title, string lastPublisher, DateOnly? lastEdit)
|
||||
}
|
||||
|
||||
class NotepadEntity{
|
||||
+ int Id
|
||||
+ int UserId
|
||||
+ UserEntity User
|
||||
+ int InquiryId
|
||||
+ InquiryEntity Inquiry
|
||||
+ string Notes
|
||||
+ NotepadEntity()
|
||||
+ NotepadEntity(int id, int userId, UserEntity user, int inquiryId, InquiryEntity inquiry, string notes)
|
||||
+ NotepadEntity(int userId, UserEntity user, int inquiryId, InquiryEntity inquiry, string notes)
|
||||
}
|
||||
|
||||
class ParagraphEntity{
|
||||
+ int Id
|
||||
+ string Title
|
||||
+ string Content
|
||||
+ string Info
|
||||
+ string Query
|
||||
+ string Comment
|
||||
|
||||
+ ParagraphEntity()
|
||||
+ ParagraphEntity(int id)
|
||||
+ ParagraphEntity(int id, string title, string content, string info, string query, string comment)
|
||||
+ ParagraphEntity(string title, string content, string info, string query, string comment)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
package Entities {
|
||||
|
||||
class SolutionEntity{
|
||||
+ int OwnerId
|
||||
+ InquiryEntity? Owner
|
||||
+ string? MurdererFirstName
|
||||
+ string? MurdererLastName
|
||||
+ string? MurderPlace
|
||||
+ string? MurderWeapon
|
||||
+ string? Explanation
|
||||
+ SolutionEntity() { }
|
||||
+ SolutionEntity(int ownerId)
|
||||
+ SolutionEntity(int ownerId, InquiryEntity? owner, string murdererFirstName, string murdererLastName, string murderPlace, string murderWeapon, string explanation)
|
||||
+ SolutionEntity(InquiryEntity? owner, string murdererFirstName, string murdererLastName, string murderPlace, string murderWeapon, string explanation)
|
||||
}
|
||||
|
||||
class SuccessEntity{
|
||||
+ int UserId
|
||||
+ UserEntity User
|
||||
+ int InquiryId
|
||||
+ InquiryEntity Inquiry
|
||||
+ bool IsFinished
|
||||
+ SuccessEntity() { }
|
||||
+ SuccessEntity(int userId, UserEntity user, int inquiryId, InquiryEntity inquiry, bool isFinished)
|
||||
+ SuccessEntity(int userId, int inquiryId, bool isFinished)
|
||||
+ SuccessEntity(UserEntity user, InquiryEntity inquiry, bool isFinished)
|
||||
}
|
||||
|
||||
class UserEntity{
|
||||
+ int Id
|
||||
+ string Username
|
||||
+ string Password
|
||||
+ string Email
|
||||
+ bool IsAdmin
|
||||
+ UserEntity() { }
|
||||
+ UserEntity(int id)
|
||||
+ UserEntity(int id, string username, string password, string email, bool isAdmin)
|
||||
+ UserEntity(string username, string password, string email, bool isAdmin)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@enduml
|
||||
```
|
Loading…
Reference in new issue