1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00

make class diagram more accurate

This commit is contained in:
Michael Jerger 2024-02-06 13:30:09 +01:00
parent 7db83688db
commit e255f73731

View file

@ -67,7 +67,7 @@ tbd
```mermaid ```mermaid
classDiagram classDiagram
namespace activitypub { namespace activitypub {
class ForgeLike { class Like {
ID ID ID ID
Type ActivityVocabularyType // Like Type ActivityVocabularyType // Like
Actor Item Actor Item
@ -83,6 +83,13 @@ classDiagram
Outbox Item Outbox Item
PublicKey PublicKey PublicKey PublicKey
} }
}
namespace forgfed {
class ForgePerson {
}
class ForgeLike {
Actor PersonID
}
class ActorID { class ActorID {
ID string ID string
Source string Source string
@ -97,9 +104,6 @@ classDiagram
} }
} }
ActorID <|-- PersonID
ForgeLike *-- PersonID: ActorID
namespace forgejo { namespace forgejo {
class User { class User {
<<Aggragate Root>> <<Aggragate Root>>
@ -115,8 +119,14 @@ classDiagram
} }
} }
Actor <|-- ForgePerson
Like <|-- ForgeLike
ActorID <|-- PersonID
ForgeLike *-- PersonID: Actor
PersonID -- User: mapped by AsLoginName() == LoginName PersonID -- User: mapped by AsLoginName() == LoginName
PersonID -- Actor: links to PersonID -- ForgePerson: links to
``` ```
### 2. Map to User-&-ExternalLoginUser ### 2. Map to User-&-ExternalLoginUser
@ -153,7 +163,7 @@ classDiagram
```mermaid ```mermaid
classDiagram classDiagram
namespace activitypub { namespace activitypub {
class ForgeLike { class Like {
ID ID ID ID
Type ActivityVocabularyType // Like Type ActivityVocabularyType // Like
Actor Item Actor Item
@ -169,6 +179,14 @@ classDiagram
Outbox Item Outbox Item
PublicKey PublicKey PublicKey PublicKey
} }
}
namespace forgfed {
class ForgePerson {
}
class ForgeLike {
Actor PersonID
}
class ActorID { class ActorID {
ID string ID string
Source string Source string
@ -183,10 +201,6 @@ classDiagram
} }
} }
ActorID <|-- PersonID
ForgeLike *-- PersonID: ActorID
PersonID -- Actor: links to
namespace user { namespace user {
class User { class User {
<<Aggregate Root>> <<Aggregate Root>>
@ -221,10 +235,17 @@ classDiagram
} }
} }
Actor <|-- ForgePerson
Like <|-- ForgeLike
ActorID <|-- PersonID
ForgeLike *-- PersonID: Actor
PersonID -- ForgePerson: links to
PersonID -- ExternalLoginUser: mapped by AsLoginName() == ExternalID
User *-- ExternalLoginUser: ExternalLoginUser.UserID User *-- ExternalLoginUser: ExternalLoginUser.UserID
User -- Source User -- Source
ExternalLoginUser -- Source ExternalLoginUser -- Source
PersonID -- ExternalLoginUser: mapped by AsLoginName() == ExternalID
``` ```
### 3. Map to User-&-FederatedUser ### 3. Map to User-&-FederatedUser
@ -258,7 +279,7 @@ classDiagram
```mermaid ```mermaid
classDiagram classDiagram
namespace activitypub { namespace activitypub {
class ForgeLike { class Like {
ID ID ID ID
Type ActivityVocabularyType // Like Type ActivityVocabularyType // Like
Actor Item Actor Item
@ -274,6 +295,14 @@ classDiagram
Outbox Item Outbox Item
PublicKey PublicKey PublicKey PublicKey
} }
}
namespace forgfed {
class ForgePerson {
}
class ForgeLike {
Actor PersonID
}
class ActorID { class ActorID {
ID string ID string
Source string Source string
@ -287,10 +316,16 @@ classDiagram
AsLoginName() string // "ID-Host" AsLoginName() string // "ID-Host"
AsWebfinger() string // "@ID@Host" AsWebfinger() string // "@ID@Host"
} }
} class FederationHost {
<<Aggregate Root>>
ID int64
HostFqdn string
}
ActorID <|-- PersonID class NodeInfo {
ForgeLike *-- PersonID: ActorID Source string
}
}
namespace user { namespace user {
class User { class User {
@ -314,22 +349,17 @@ classDiagram
FederationHost int64 FederationHost int64
} }
} }
Actor <|-- ForgePerson
Like <|-- ForgeLike
ActorID <|-- PersonID
ForgeLike *-- PersonID: Actor
ForgePerson -- PersonID: links to
FederationHost *-- NodeInfo
User *-- FederatedUser: FederatedUser.UserID User *-- FederatedUser: FederatedUser.UserID
PersonID -- FederatedUser : mapped by PersonID.asWebfinger() == FederatedUser.externalID PersonID -- FederatedUser : mapped by PersonID.asWebfinger() == FederatedUser.externalID
namespace forgefed {
class FederationHost {
<<Aggregate Root>>
ID int64
HostFqdn string
}
class NodeInfo {
Source string
}
}
FederationHost *-- NodeInfo
FederatedUser -- FederationHost FederatedUser -- FederationHost
@ -358,7 +388,7 @@ classDiagram
```mermaid ```mermaid
classDiagram classDiagram
namespace activitypub { namespace activitypub {
class ForgeLike { class Like {
ID ID ID ID
Type ActivityVocabularyType // Like Type ActivityVocabularyType // Like
Actor Item Actor Item
@ -374,6 +404,14 @@ classDiagram
Outbox Item Outbox Item
PublicKey PublicKey PublicKey PublicKey
} }
}
namespace forgfed {
class ForgePerson {
}
class ForgeLike {
Actor PersonID
}
class ActorID { class ActorID {
ID string ID string
Source string Source string
@ -387,23 +425,6 @@ classDiagram
AsLoginName() string // "ID-Host" AsLoginName() string // "ID-Host"
AsWebfinger() string // "@ID@Host" AsWebfinger() string // "@ID@Host"
} }
}
ActorID <|-- PersonID
ForgeLike *-- PersonID: ActorID
PersonID -- Actor: links to
namespace user {
class CommonUser {
<<Interface>>
}
class User {
}
}
User ..<| CommonUser
namespace forgefed {
class FederatedPerson { class FederatedPerson {
<<Aggregate Root>> <<Aggregate Root>>
ID int64 ID int64
@ -423,6 +444,24 @@ classDiagram
Source string Source string
} }
} }
namespace user {
class CommonUser {
<<Interface>>
}
class User {
}
}
User ..<| CommonUser
Actor <|-- ForgePerson
Like <|-- ForgeLike
ActorID <|-- PersonID
ForgeLike *-- PersonID: Actor
PersonID -- ForgePerson: links to
PersonID -- FederatedPerson : mapped by PersonID.asWebfinger() == FederatedPerson.externalID PersonID -- FederatedPerson : mapped by PersonID.asWebfinger() == FederatedPerson.externalID
FederationHost *-- NodeInfo FederationHost *-- NodeInfo
FederatedPerson -- FederationHost FederatedPerson -- FederationHost