<template>
    <div>
        <my-page
            name="staff"
            fetch-url="/staff"
            :search-data="[
                { title: '姓名', name: 'name', type: 'input', operation: 'like' },
                { title: '邮箱', name: 'email', type: 'input', operation: 'like' },
                { title: '角色', name: 'roles.id', type: 'select', options: 'roles'},
                { title: '创建时间', name: 'created_at', type: 'date', operation: 'between' },
            ]"
            :table-data="[
                {name: 'id', title: 'ID'},
                {name: 'name', title: '姓名'},
                {name: 'email', title: '邮箱'},
                {name: 'role', title: '角色'},
                {name: 'created_at', title: '创建时间'}
            ]"
            :actions="['add', 'update', 'delete']"
            :add-data="['roles']"
        />
    </div>
</template>

<script>
import MyPage from '../components/MyPage.vue'

export default {
    components: {
        MyPage
    }
}
</script>