import request from '@/utils/request' ; import { Play } from '@root/src/models/play' ; export const addPlay = ( params ) => { return request . post < ResponseData < Play > > ( '/play' , params , { 'Content-Type' : 'multipart/form-data' } ) ; } ; export const getPlay = ( id ) => { return request . get < ResponseData < Play > > ( `/play/${ id }` ) ; } ; export const getPlays = ( params = { } ) => { return request . get < ResponseList < Play > > ( '/plays' , params ) ; } ; export const updatePlay = ( id , params ) => { return request . put < ResponseData < Play > > ( `/play/${ id }` , params , { 'Content-Type' : 'multipart/form-data' } ) ; } ; export const deletePlay = ( id ) => { return request . delete < ResponseData < Play > > ( `/play/${ id }` ) ; } ;