import { Timestamp } from "./timestamp";

export interface Segmen {
  id: string;
  map_street_section_id: string;
  map_street_id: string;
  name: string;
  center_point: string;
  length: number;
  order: number;
  geojson: string;
  photos: Photos[];
}

export interface Segmens {
  id: string;
  report_id: string;
  map_street_segmen_id: string;
  user_type: string;
  user_level: string;
  segmen: Segmen;
  photos: Photos[];
  analytic_data?: AnalyticData;
}

export interface AnalyticData {
  id: string;
  report_segmen_id: string;
  type_segmen_system: string;
  level_segmen_system: string;
  type_segmen_admin: string;
  level_segmen_admin: string;
  confidence: number;
}

export interface Survey extends Timestamp {
  id: string;
  report_id: string;
  created_by: string;
  date: Date;
  tingkat_kerusakan: string;
  tipe_kerusakan: string;
  kedalaman_lubang: string;
  jenis_material: string;
  masukan_material: string;
  length: number;
  width: number;
  note: string;
  photos: Photo[];
}

export interface Photo {
  id: string;
  survey_id: string;
  filename: string;
  abs_path: string;
  file_dump_id: null;
  created_at: Date;
  updated_at: Date;
}

export interface StatusReport {
  id: string;
  name: string;
}

export interface Schedule {
  id: string;
  report_id: string;
  date_start: Date;
  status: string;
  note: string;
  date_end: Date;
  length: number;
}

export interface Photos {
  id: string;
  report_segmen_id: string;
  filename: string;
  abs_path: string;
  file_dump_id: string;
  created_at: Date;
  updated_at: Date;
}

export interface CenterPoint {
  type: string;
  coordinates: string[];
}

export interface Rating {
  id: string;
  report_id: string;
  rate: number;
  comment: string;
  created_at: Date;
  updated_at: Date;
}

export interface PredictRoad {
  predicted_label: string;
}
