init project portal web
This commit is contained in:
26
lib/price-plan/data/repository/index.ts
Normal file
26
lib/price-plan/data/repository/index.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { apiClient } from "@/services/api/api-client"
|
||||
|
||||
export type CreatePricePlanPayload = {
|
||||
offerType: string
|
||||
offerName: string
|
||||
applyLevel?: string
|
||||
pricePlanCode?: string
|
||||
remarks?: string
|
||||
sourceFrom?: string
|
||||
baseValidPeriod: string
|
||||
versionValidPeriod?: string
|
||||
serviceType?: number
|
||||
}
|
||||
|
||||
export const pricePlanRepository = {
|
||||
getMenuList: async () => await apiClient("/api/priceplan/menu", "POST"),
|
||||
getPricePlan: async ({page, size, type}: {page: number, size: number, type: string}) => await apiClient("/api/priceplan", "POST", {
|
||||
page,
|
||||
size,
|
||||
type
|
||||
}),
|
||||
createPricePlan: async (payload: CreatePricePlanPayload) => await apiClient("/api/priceplan/create", "POST", payload),
|
||||
deletePricePlan: async (id: string) => await apiClient("/api/priceplan/delete", "POST", {id}),
|
||||
getPricePlanTypes: async () => await apiClient("/api/priceplan/types", "POST"),
|
||||
getServiceTypes: async () => await apiClient("/api/priceplan/servetypes", "POST"),
|
||||
}
|
||||
Reference in New Issue
Block a user