<script setup>
import { model, q } from "#imports";
const props = defineProps(["id"]);
</script>

<template>
    <div>
        <l-table row-key="eventlog_id" sort-by="eventlog_id:desc"
            :columns="model('EventLog').columns(['eventlog_id', 'class', 'id', 'action', 'created_time'])"
            @request-data="async (req) => {
  const a = {
    listUser: {
      __args: {
        filters: {
          user_id: props.id
        }
      },
      data: {
        __args: {
          limit: 1
        },
        eventLog: req.gql
      }
    }
  };
  let resp = await q(a);
  req.setData(resp.listUser.data[0].eventLog);
}" />
    </div>
</template>
