from django.db import models


class Fonction(models.Model):
    """
    Modèle des fonctions
    """

    fon_id = models.CharField(max_length=100, primary_key=True)
    fon_libelle = models.CharField(max_length=100)
    def as_dict(self):
        return {
            "id": self.fon_id,
            "libelle": self.fon_libelle,
        }