Initial commit
This commit is contained in:
80
docs/concepts/21-ABONNEMENT.md
Normal file
80
docs/concepts/21-ABONNEMENT.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# 💳 CONCEPT: ABONNEMENT
|
||||
|
||||
## 📌 Vue d'ensemble
|
||||
|
||||
Le concept **ABONNEMENT** gère les abonnements et plans tarifaires pour les entreprises utilisant BTPXpress.
|
||||
|
||||
**Importance**: ⭐⭐ (Concept commercial)
|
||||
|
||||
---
|
||||
|
||||
## 🗂️ Fichiers concernés
|
||||
|
||||
### **Entités JPA**
|
||||
| Fichier | Description |
|
||||
|---------|-------------|
|
||||
| `Abonnement.java` | Entité abonnement |
|
||||
|
||||
---
|
||||
|
||||
## 📊 Modèle de données
|
||||
|
||||
```java
|
||||
@Entity
|
||||
@Table(name = "abonnements")
|
||||
public class Abonnement extends PanacheEntityBase {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.UUID)
|
||||
private UUID id;
|
||||
|
||||
@Column(name = "nom_plan", nullable = false)
|
||||
private String nomPlan;
|
||||
|
||||
@Column(name = "prix_mensuel", precision = 10, scale = 2)
|
||||
private BigDecimal prixMensuel;
|
||||
|
||||
@Column(name = "date_debut", nullable = false)
|
||||
private LocalDate dateDebut;
|
||||
|
||||
@Column(name = "date_fin")
|
||||
private LocalDate dateFin;
|
||||
|
||||
@Column(name = "actif")
|
||||
private Boolean actif = true;
|
||||
|
||||
@Column(name = "nombre_utilisateurs_max")
|
||||
private Integer nombreUtilisateursMax;
|
||||
|
||||
@Column(name = "nombre_chantiers_max")
|
||||
private Integer nombreChantiersMax;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔌 API REST
|
||||
|
||||
### **Endpoints**
|
||||
|
||||
| Méthode | Endpoint | Description |
|
||||
|---------|----------|-------------|
|
||||
| GET | `/api/v1/abonnements` | Liste abonnements |
|
||||
| GET | `/api/v1/abonnements/{id}` | Détails |
|
||||
| POST | `/api/v1/abonnements` | Créer |
|
||||
| PUT | `/api/v1/abonnements/{id}` | Modifier |
|
||||
|
||||
---
|
||||
|
||||
## 💻 Plans disponibles
|
||||
|
||||
| Plan | Prix/mois | Utilisateurs | Chantiers |
|
||||
|------|-----------|--------------|-----------|
|
||||
| STARTER | 49€ | 3 | 5 |
|
||||
| BUSINESS | 99€ | 10 | 20 |
|
||||
| ENTERPRISE | 199€ | Illimité | Illimité |
|
||||
|
||||
---
|
||||
|
||||
**Dernière mise à jour**: 2025-09-30
|
||||
**Version**: 1.0
|
||||
|
||||
Reference in New Issue
Block a user