Created
July 4, 2020 00:43
-
-
Save cursodjangopro/d1dbdc805443c7d3aec11a7ce4d07076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
skinparam roundcorner 10 | |
title Class Diagram - ToDo App | |
class User #pink { | |
first_name: CharField | |
last_name: CharField | |
username: CharField | |
password: CharField | |
email: EmailField | |
} | |
note right of User | |
A classe User é do pacote django.contrib.auth | |
end note | |
class UserProfile { | |
photo: ImageField | |
cell_phone: CharField | |
__str__() | |
} | |
class Category { | |
name: CharField | |
description: TextField | |
owner: User | |
__str__() | |
} | |
class Task { | |
name: CharField | |
description: TextField | |
end_date: DateField | |
priority: CharField | |
category: Category | |
status: CharField | |
owner: User | |
__str__() | |
} | |
note right of Task::priority | |
PRIORITY_CHOICES = ( | |
('B', 'Baixa'), | |
('M', 'Média'), | |
('A', 'Alta'), | |
) | |
end note | |
note right of Task::status | |
STATUS_CHOICES = ( | |
('EX', 'Em execução'), | |
('PD', 'Pendente'), | |
('CD', 'Concluída'), | |
) | |
end note | |
Task "ForeignKey" -- User | |
Task "ManyToMany" -- Category | |
Category "ForeignKey" -- User | |
User "OneToOne" -- UserProfile | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment