'use server'

import {PageRecord} from '@/lib/api'
import {Announcement} from '@/lib/models'
import {callByUser} from './base'

export async function listAnnouncements(props: {
  page: number
  size: number
  title?: string
  type?: number
  status?: number
  create_after?: Date
  create_before?: Date
  update_after?: Date
  update_before?: Date
}) {
  return await callByUser<PageRecord<Announcement>>('/api/announcement/list', props)
}
