@startuml

left to right direction

class User {
    -m_UserId : int
    -m_UserName : string
    -m_UserEmail : string
    -m_UserType : UserType
    +registerUser() : void
    +createToken() : void
    +deleteToken() : void
    +getUserId() : void
    +createCommentary(commentaryText: string) : Commentary
}

class Admin {
    +modifyCategory() : void
    +deleteVideo() : void
    +modifyMetaData() : void
    +modifyVideoUrl() : void
}

class Category {
    -m_CategoryId : int
    -m_CategoryTitle : string
    -m_CategoryUrl : string
    -m_CategorySubtitle : string
    -m_CategoryColor : byte[3]
    +m_CategoryComments : Commentary[]
    +m_ExtraInfos : ExtraInfos[]
    +m_CategoryAlterationHistory : AlterationHistory[]
    +setCategoryTitle() : void
    +getCategoryTitle() : string
    +setCategoryUrl() : void
    +getCategoryUrl() : string
    +setCategorySubtitle() : void
    +getCategorySubtitle() : string
    +setCategoryColor() : void
    +getCategoryColor() : byte[3]
    +searchCategory() : Category[]
    +deleteCategory() : void
    +createCategory() : void
    +shareCategory() : string
    +filterCategory(): Category[]
}

class Commentary {
    -m_CommentaryId : int
    -m_Author : User
    +m_CommentaryText : string
    +getCommentaryId() : void
    +getAuthor() : User
}
class ExtraInfos {
    -m_ExtraInfosId : int
    -m_Creator : User
    +m_ExtraInfoCreatedAt : DateTime
    +m_ExtraInfoEditedAt : DateTime
    +m_ExtraInfoTitle: string;
    +m_ExtraInfoBody: string;
}

class Video {
    -m_VideoId : int
    -m_VideoCategory : Category
    -m_VideoMetadata : Metadata
    +m_VideoComments : Commentary[]
    +m_VideoExtraInfos : ExtraInfos[]
    +m_VideoAlterationHistory : AlterationHistory[]
    +deleteVideoFromCategory() : void
    +searchVideo() : Video[]
    +addVideoInCategory() : void
    +getMetadata() : Metadata
    +shareVideo() : string
    +filterVideos() : Video[]
}

class Metadata{
    -m_MetadataID : int
    -m_MetadataVideoLink : string
    -m_MetadataTitle : string
    -m_MetadataDescription : string
    -m_MetadataVideoYoutubeChannel : string
    +getMetadataId(): int
    +setMetadataTitle(): void
    +getMetadataTitle(): string
    +setMetadataDescription(): void
    +getMetadataDescription(): string
}

class AlterationHistory {
    -m_Alterator: User
    -m_LastAlteration: DateTime
    -m_Alteration: string
}

class Channel {
    -m_ChannelId : int
    +m_Creator : User
    -m_Private: bool
    -m_Participants: User[]
    +m_Contents: string[]
    +getChannelId() : int
    +setPrivacity() : void
    +getPrivacity() : bool
    +getParticipants() : User[]
    +searchChannel() : Channel[]
    +enterInChannel() : void 
    +inviteLink() : string
    +createAContent() : string

}



enum UserType {
    NORMAL_USER = 1
    ADMIN_USER = 2
}

User "1"-up-"1" UserType
User "1"--"0..*" Category
User "1"--"0..*" Video
User <|-- Admin

Video "1"*-down-"1" Metadata : Possui
Video "0..*"*--"1" Category : Associa

Commentary "0..*"*-up-"1" Video : Possui
ExtraInfos "0..*"*-up-"1" Video : Possui
AlterationHistory "0..*"*-up-"1" Video : Possui
Channel "0..*"*--"1" User : Possui/Participa

Commentary "0..*"*--"1" Category : Possui
ExtraInfos "0..*"*--"1" Category : Possui
AlterationHistory "0..*"*--"1" Category : Possui

note left of User : {createToken()} Cria um token de acesso, equivalente a fazer login.
note left of User : {deleteToken()} Equivalente a fazer logout. Responsável por expirar o token.

note left of Video : {m_VideoUrl} URL de um vídeo do Youtube.
note left of Video : {searchVideoOnYoutube() : VideoFromYouTube[]} retorna uma lista de videos do YouTube.
note left of Channel : {searchChannel} e {enterInChannel} Somente estaráo disponíveis.
note left of Channel : se o Channel não for privado ({getPrivacity()} retornar false).

note bottom of Metadata : São informações vindas diretamente do Youtube.

@enduml
