@startuml
skinparam shadowing false
skinparam defaultFontName xfonts-wqy
skinparam dpi 300
skinparam activity  {
    DiamondFontSize 14
    ArrowFontSize 14
    FontSize 14
}

class Msg {
    - MsgHeader msgHeader;
    - MsgBody msgBody;
}

Msg --> MsgHeader
Msg --> MsgBody

class MsgHeader {
    - UUID tempId
    - UUID preTempId
    - Date preSendTime
    - MsgType msgType;
    - boolean needPersistent;
    - boolean needRelationVerify
    - String relationTopic;
    - Long senderId;
    - Long rcvrId;
    - Long groupId;
}

class MsgBody {
    - Long msgId;
    - Long appId;
    - Long senderId;
    - String msgTopic;
    - MsgType msgType;
    - Date sendTime;
    - MsgTransferStatus status;
    - Object payload;
    - Object detail;
}
class PersonalMsgBody extends MsgBody {
    - Long rcvrId;
}

class GroupMsgBody extends MsgBody {
    - Long groupId;
}

enum MsgTransferStatus {
    SENDING
    SENT
    REND
    FAIL
    REJECT
}

MsgTransferStatus <-- MsgBody
@enduml