Spaces:
Sleeping
Sleeping
Download formations/models.py from FerdinandPyCode/lambda_hf_v2: direct link, hf CLI and curl.
- Browser
- Download file 3.49 kB
-
https://huggingface.co/spaces/FerdinandPyCode/lambda_hf_v2/resolve/ae7a4b003d0218640e35fed4f7eeb7c2340ae09f/formations/models.py
- Command line
-
hf download hf://spaces/FerdinandPyCode/lambda_hf_v2@ae7a4b003d0218640e35fed4f7eeb7c2340ae09f/formations/models.py
-
curl -L -o models.py https://huggingface.co/spaces/FerdinandPyCode/lambda_hf_v2/resolve/ae7a4b003d0218640e35fed4f7eeb7c2340ae09f/formations/models.py
3.49 kB
| from django.db import models | |
| # Create your models here. | |
| from authentication.models import User | |
| class CategorieFormation(models.Model): | |
| titre = models.CharField(max_length=255) | |
| tag = models.CharField(max_length=255) | |
| icone = models.CharField(max_length=255) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class Formation(models.Model): | |
| description = models.CharField(max_length=1024) | |
| titre = models.CharField(max_length=255) | |
| image = models.FileField(max_length=1024) | |
| prerequis = models.CharField(max_length=1024) | |
| author = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| montant = models.DecimalField(default=0, max_digits=16, decimal_places= 2) | |
| categorie = models.ForeignKey(CategorieFormation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class UserFormation(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class Cours(models.Model): | |
| titre = models.CharField(max_length=255) | |
| duree = models.IntegerField() | |
| video = models.FileField(max_length=1024) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| # -------------------- | |
| class ArchiveFormation(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class ListSouhaitFormation(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class FavorisFormation(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class PanierUser(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class AvisFormation(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |
| class PaiementUser(models.Model): | |
| user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True) | |
| formation = models.ForeignKey(Formation, on_delete=models.SET_NULL, null=True) | |
| created_at = models.DateTimeField(auto_now_add=True) | |
| updated_at = models.DateTimeField(auto_now = True) | |