Skip to content

Instantly share code, notes, and snippets.

@cursodjangopro
Created July 4, 2020 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursodjangopro/d1dbdc805443c7d3aec11a7ce4d07076 to your computer and use it in GitHub Desktop.
Save cursodjangopro/d1dbdc805443c7d3aec11a7ce4d07076 to your computer and use it in GitHub Desktop.
@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