declare namespace SgwModel {
  // Banzone Management
  interface ZoneBasicInfo {
    name?: string;
    province_code?: string;
    type?: number;
    conditions?: Condition[];
    description?: string;
    geometry?: string;
    enabled?: boolean;
  }

  interface Banzone extends ZoneBasicInfo {
    id?: string;
    created_at?: Date;
    updated_at?: Date;
  }

  interface Condition {
    max?: number;
    min?: number;
    type?: 'length_limit' | 'month_range' | 'date_range';
    to?: number;
    from?: number;
  }

  interface Geom {
    geom_type?: number;
    geom_poly?: string;
    geom_lines?: string;
    geom_point?: string;
    geom_radius?: number;
  }

  interface ZoneBodyRequest {
    name: string;
    group_id: string;
    type: number;
    conditions: Condition[];
    description?: string;
    enabled?: boolean;
    geom: string;
    province_code: string;
  }

  interface ZoneResponse extends Partial<MasterModel.PaginationResponse> {
    banzones?: Banzone[];
    total?: number;
  }

  interface SearchZonePaginationBody extends MasterModel.SearchPaginationBody {
    order?: string;
    metadata?: {
      province_code?: string;
      type?: number;
      enabled?: boolean;
    };
  }
}
