chore: 인터페이스 네이밍 규칙 변경('I' prefix 제거)
This commit is contained in:
@@ -4,13 +4,13 @@ import {
|
||||
siteFormSchema,
|
||||
type SiteService,
|
||||
type SiteList,
|
||||
type ISiteDetail,
|
||||
type ISiteParams,
|
||||
type SiteDetail,
|
||||
type SiteParams,
|
||||
type SiteFormData,
|
||||
} from "../model/site-interface";
|
||||
|
||||
export class SiteApiService implements SiteService {
|
||||
public async getSiteList(params: ISiteParams): Promise<SiteList> {
|
||||
public async getSiteList(params: SiteParams): Promise<SiteList> {
|
||||
const response = await client.get<SiteList>(
|
||||
`${ENDPOINT.CMS_SERVICE.SITES}`,
|
||||
{ params },
|
||||
@@ -18,8 +18,8 @@ export class SiteApiService implements SiteService {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async siteDetail(siteId: string): Promise<ISiteDetail> {
|
||||
const response = await client.get<ISiteDetail>(
|
||||
public async siteDetail(siteId: string): Promise<SiteDetail> {
|
||||
const response = await client.get<SiteDetail>(
|
||||
`${ENDPOINT.CMS_SERVICE.SITES}/${siteId}`,
|
||||
);
|
||||
return response.data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export { SiteApi } from "./api/site-service";
|
||||
export {
|
||||
siteFormSchema,
|
||||
type ISiteParams,
|
||||
type ISite,
|
||||
type SiteParams,
|
||||
type Site,
|
||||
type SiteFormData,
|
||||
} from "./model/site-interface";
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { z } from "zod";
|
||||
import type { IPageableParams, PageableList } from "@/shared/model";
|
||||
import type { PageableParams, PageableList } from "@/shared/model";
|
||||
|
||||
export interface ISiteParams extends IPageableParams {
|
||||
export interface SiteParams extends PageableParams {
|
||||
siteNm?: string;
|
||||
siteKndCd?: string;
|
||||
useYn?: string;
|
||||
}
|
||||
|
||||
export interface ISite {
|
||||
export interface Site {
|
||||
siteId: string;
|
||||
siteNm: string;
|
||||
siteKindCode: string;
|
||||
@@ -19,7 +19,7 @@ export interface ISite {
|
||||
dmnAddr: string;
|
||||
}
|
||||
|
||||
export interface ISiteDetail extends SiteFormData {
|
||||
export interface SiteDetail extends SiteFormData {
|
||||
siteId: string;
|
||||
siteKindNm: string;
|
||||
basicSiteYn: string;
|
||||
@@ -49,11 +49,11 @@ export const siteFormSchema = z.object({
|
||||
});
|
||||
|
||||
export type SiteFormData = z.infer<typeof siteFormSchema>;
|
||||
export type SiteList = PageableList<ISite[]>;
|
||||
export type SiteList = PageableList<Site[]>;
|
||||
|
||||
export interface SiteService {
|
||||
getSiteList(params: ISiteParams): Promise<SiteList>;
|
||||
siteDetail(siteId: string): Promise<ISiteDetail>;
|
||||
getSiteList(params: SiteParams): Promise<SiteList>;
|
||||
siteDetail(siteId: string): Promise<SiteDetail>;
|
||||
modifySite(siteId: string, data: SiteFormData): Promise<void>;
|
||||
createSite(data: SiteFormData): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import type {
|
||||
Domain,
|
||||
DomainService,
|
||||
DomainList,
|
||||
IDomainParams,
|
||||
DomainParams,
|
||||
} from "../model/domain-interface";
|
||||
|
||||
export class DomainApiService implements DomainService {
|
||||
public async getDomainList(params: IDomainParams): Promise<DomainList> {
|
||||
public async getDomainList(params: DomainParams): Promise<DomainList> {
|
||||
const response = await client.get<DomainList>(
|
||||
`${ENDPOINT.CMS_SERVICE.DOMAINS}`,
|
||||
{ params },
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type { IIpParams, IP, IpList, IpService } from "../model/ip-interface";
|
||||
import type { IpParams, IP, IpList, IpService } from "../model/ip-interface";
|
||||
|
||||
export class IpApiService implements IpService {
|
||||
public async getIpList(params: IIpParams): Promise<IpList> {
|
||||
public async getIpList(params: IpParams): Promise<IpList> {
|
||||
const response = await client.get<IpList>(`${ENDPOINT.CMS_SERVICE.IPS}`, {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import type { IPageableParams, PageableList } from "@/shared/model";
|
||||
import type { PageableParams, PageableList } from "@/shared/model";
|
||||
|
||||
export interface IDomainParams extends IPageableParams {
|
||||
export interface DomainParams extends PageableParams {
|
||||
keywordType?: string;
|
||||
keyword?: string;
|
||||
siteId?: string;
|
||||
@@ -26,6 +26,6 @@ export type DomainFormData = z.infer<typeof domainFormSchema>;
|
||||
export type DomainList = PageableList<Domain[]>;
|
||||
|
||||
export interface DomainService {
|
||||
getDomainList(params: IDomainParams): Promise<DomainList>;
|
||||
getDomainList(params: DomainParams): Promise<DomainList>;
|
||||
saveDomainList(body: Domain[]): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import type { IPageableParams, PageableList } from "@/shared/model";
|
||||
import type { PageableParams, PageableList } from "@/shared/model";
|
||||
|
||||
export interface IIpParams extends IPageableParams {
|
||||
export interface IpParams extends PageableParams {
|
||||
siteId: string;
|
||||
ipAddr?: string;
|
||||
prmYn?: string;
|
||||
@@ -24,6 +24,6 @@ export type IPFormData = z.infer<typeof ipFormSchema>;
|
||||
export type IpList = PageableList<IP[]>;
|
||||
|
||||
export interface IpService {
|
||||
getIpList(params: IIpParams): Promise<IpList>;
|
||||
getIpList(params: IpParams): Promise<IpList>;
|
||||
saveIpList(body: IP[]): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import dayjs from "dayjs";
|
||||
import { createColumnHelper } from "@tanstack/react-table";
|
||||
import type { ISite } from "@/entities/site";
|
||||
import type { Site } from "@/entities/site";
|
||||
|
||||
const columnHelper = createColumnHelper<ISite>();
|
||||
const columnHelper = createColumnHelper<Site>();
|
||||
|
||||
const columns = [
|
||||
columnHelper.accessor((_, index) => index + 1, {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useEffect, useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
import { Button, DataTable, Input } from "@common/components";
|
||||
import { SiteApi, type ISite, type ISiteParams } from "@/entities/site";
|
||||
import { SiteApi, type Site, type SiteParams } from "@/entities/site";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { PageLayout } from "@/shared/ui/page-layout";
|
||||
import { columns } from "../model/table-columns";
|
||||
@@ -20,7 +20,7 @@ function SitePage() {
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
const [siteQuery, setSiteQuery] = useState<ISiteParams>({
|
||||
const [siteQuery, setSiteQuery] = useState<SiteParams>({
|
||||
siteNm: "",
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ function SitePage() {
|
||||
refetch();
|
||||
};
|
||||
|
||||
const handleRowClick = (row: ISite) => {
|
||||
const handleRowClick = (row: Site) => {
|
||||
router.push(`/site/register/${row.siteId}`);
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export interface PageableList<T> {
|
||||
empty: boolean;
|
||||
}
|
||||
|
||||
export interface IPageableParams {
|
||||
export interface PageableParams {
|
||||
page?: number;
|
||||
size?: number;
|
||||
sort?: string[];
|
||||
|
||||
Reference in New Issue
Block a user