<template>
    <my-table url="/api/v1/messages/notices">
        <template #search="{query}">
            <my-form-item label="开始时间">
                <a-date-picker
                    class="tw-w-full"
                    show-time
                    v-model="query.startTime"
                    valueFormat="YYYY-MM-DD HH:mm:ss"
                />
            </my-form-item>
            <my-form-item label="结束时间">
                <a-date-picker
                    class="tw-w-full"
                    show-time
                    v-model="query.endTime"
                    valueFormat="YYYY-MM-DD HH:mm:ss"
                />
            </my-form-item>
            <my-form-item label="是否已读">
                <a-select v-model="query.isRead" allowClear>
                    <a-select-option :value="1">已读</a-select-option>
                    <a-select-option :value="0">未读</a-select-option>
                </a-select>
            </my-form-item>
        </template>

        <a-table-column title="标题" data-index="noticeTitle" />
        <a-table-column title="内容" data-index="noticeContent" />
        <a-table-column title="创建时间" data-index="createTime" />
        <a-table-column title="发送者" data-index="noticeSenderName" />
        <a-table-column title="接受者" data-index="noticeReceiverName" />
        <a-table-column title="是否已读" data-index="isReadName" />
        <a-table-column title="已读时间" data-index="readTime" />
    </my-table>
</template>
