
const moduleName = 'property-news'

export default prefix => {
  return {
    // 列表
    getNewsList: {
      url: `${prefix}/${moduleName}`,
      method: 'get',
      action: `admin.${moduleName}.list`
    },

    // 详情
    getNewsDetail: {
      url: `${prefix}/${moduleName}/:id`,
      method: 'get',
      action: `admin.${moduleName}.detail`
    },

    // 新增
    addNews: {
      url: `${prefix}/${moduleName}`,
      method: 'post',
      action: `admin.${moduleName}.add`
    },

    // 更新
    updateNews: {
      url: `${prefix}/${moduleName}/:id`,
      method: 'put',
      action: `admin.${moduleName}.update`
    },

    // 删除
    deleteNews: {
      url: `${prefix}/${moduleName}/id`,
      method: 'delete',
      action: `admin.${moduleName}.delete`
    }
  }
}
