from django_managed_commands.base import ManagedCommand


class Command(ManagedCommand):
    """
    {command_name} management command.

    This command extends ManagedCommand which provides:
    - Automatic execution tracking in CommandExecution model
    - Database transaction wrapping (rollback on failure)
    - Timing and duration recording
    - Run-once support via `run_once = True`
    """

    help = "{command_name} command - add your description here"

    # Set to True if this command should only run once successfully
    run_once = False

    def add_arguments(self, parser):
        # Example argument (uncomment and modify as needed):
        # parser.add_argument(
        #     "--dry-run",
        #     action="store_true",
        #     help="Run without making changes",
        # )
        # Docs: https://docs.djangoproject.com/en/stable/howto/custom-management-commands/
        pass

    def execute_command(self, *args, **options):
        # TODO: Add your command logic here

        self.stdout.write(self.style.SUCCESS("{command_name} completed successfully"))
