initial commit

This commit is contained in:
BeauTroll
2026-01-19 08:52:38 +01:00
commit 46907ca153
193 changed files with 35051 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
# 4. Data Models
## Entity Relationship Diagram
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ User │ │ Account │ │ Character │
├─────────────┤ ├─────────────┤ ├─────────────┤
│ id │ │ id │ │ id │
│ email │──┐ │ name │──┐ │ name │
│ password │ │ │ userId ◄─┘ │ │ level │
│ createdAt │ └───►│ createdAt │ └───►│ classId │
│ updatedAt │ │ updatedAt │ │ serverId │
└─────────────┘ └─────────────┘ │ accountId ◄─┘
│ createdAt │
│ updatedAt │
└──────┬──────┘
┌────────────────────────────┼────────────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Team │ │TeamMember │ │ CharProgress│
├─────────────┤ ├─────────────┤ ├─────────────┤
│ id │◄─────────────│ teamId │ │ id │
│ name │ │ characterId │◄─────────────│ characterId │
│ type │ │ joinedAt │ │ progressId │
│ userId │ └─────────────┘ │ completed │
│ createdAt │ │ completedAt │
│ updatedAt │ └─────────────┘
└─────────────┘ │
┌─────────────┐
│ Progression │
├─────────────┤
│ id │
│ name │
│ type │
│ category │
│ dofusDbId │
└─────────────┘
```
## Core Entities
### User
```typescript
interface User {
id: string;
email: string;
passwordHash: string;
createdAt: Date;
updatedAt: Date;
}
```
### Account
```typescript
interface Account {
id: string;
name: string;
userId: string;
createdAt: Date;
updatedAt: Date;
}
```
### Character
```typescript
interface Character {
id: string;
name: string;
level: number;
classId: number;
className: string;
serverId: number;
serverName: string;
accountId: string;
createdAt: Date;
updatedAt: Date;
}
```
### Team
```typescript
interface Team {
id: string;
name: string;
type: 'MAIN' | 'SECONDARY' | 'CUSTOM';
userId: string;
createdAt: Date;
updatedAt: Date;
}
```
### Progression
```typescript
interface Progression {
id: string;
name: string;
type: 'QUEST' | 'DUNGEON' | 'ACHIEVEMENT' | 'DOFUS';
category: string;
dofusDbId: number | null;
}
```
### CharacterProgression
```typescript
interface CharacterProgression {
id: string;
characterId: string;
progressionId: string;
completed: boolean;
completedAt: Date | null;
}
```
---