通用plantuml 时序图(Sequence Diagram)模板头
通用plantuml文件
@startuml
participant Admin order 0 #87CEFA // 参与者、顺序、颜色
participant Student order 1 #87CEFA
participant Teacher order 2 #87CEFA
participant TestPlayer order 3 #87CEFA
participant Class order 4 #87CEFA
participant Subject order 5 #87CEFA
participant Division order 6 #87CEFA
autonumber "<b>0:" // 关键字 autonumber 用于自动对消息编号。
skinparam style strictuml //为了符合严格 UML 的标准(线头的形状必须是三角形,而不能是箭头形
Teacher -> TestPlayer ++ #90EE90 : Prepare TestPaper
Admin -> Student ++ #90EE90 : Add/Modify Student
Subject -> Subject ++-- #90EE90 : Display Subjects
Division -> Division ++-- #90EE90: Display Division
Class -> Class ++-- #90EE90: Display Class
TestPlayer --> Teacher --: return
Student --> Admin --: return
Admin -> Teacher ++ #90EE90 : Hire Teacher
return return
...5 min later...
||45|| // 你可以使用 ||| 来增加空间,还可以使用数字指定增加的像素的数量
Admin -> Class ++ #90EE90 : Add/Modify Class
return return
note left : this is note
Admin -> Subject ++ #90EE90 : Add/Modify Subject
return return
note right
this is a long note
long note
end note
Admin -> Division ++ #90EE90 : Add/Modify Division
return return
alt #PaleGoldenRod has_exam
Teacher -> Student : start exam
else #Pink
Teacher -> Student : start class
end
loop 100times
Student -> Teacher : loop
end
opt SpringTravel
Teacher -> Student : travel
end
@enduml
以下是uml图的样式
附颜色表