import apiClient from '../api-client';

/**
 * 농장(Farm) 관련 API
 */

export interface FarmDto {
  pkFarmNo: number;
  fkUserNo: number;
  farmCode: string;
  farmName: string;
  farmAddress: string;
  farmBizNo: string;
  farmGovNo?: string;
  delYn: 'Y' | 'N';
  regDt: Date;
  updtDt: Date;
}

export const farmApi = {
  /**
   * GET /farm - 현재 로그인한 사용자의 농장 목록 조회
   */
  findAll: async (): Promise<FarmDto[]> => {
    return await apiClient.get('/farm');
  },
};
