# Generated by Codex on 2026-05-25

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("facturation", "0030_produit_created_by_and_nom_index"),
    ]

    operations = [
        migrations.CreateModel(
            name="PermissionBouton",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("module", models.CharField(db_index=True, max_length=80)),
                ("bouton", models.CharField(db_index=True, max_length=80)),
                ("label", models.CharField(max_length=255)),
                (
                    "role",
                    models.CharField(
                        choices=[
                            ("ADMIN", "Administrateur"),
                            ("VENDEUR", "Agent Point de Vente"),
                        ],
                        db_index=True,
                        max_length=20,
                    ),
                ),
                ("autorise", models.BooleanField(default=False)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Permission bouton POS",
                "verbose_name_plural": "Permissions boutons POS",
                "unique_together": {("module", "bouton", "role")},
            },
        ),
    ]
