import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Timestamp } from "../../interfaces/timestamp";
import { ApiService } from "../../services/api.service";
import { HelpersService } from "../../services/helpers.service";

export interface SubDistrict extends Timestamp {
  id: string;
  province_id: number;
  city_id: number;
  district_id: number;
  name: string;
  type: string;
  geojson: string;
}

@Injectable({
  providedIn: "root",
})
export class SubDistricService extends ApiService<SubDistrict> {
  constructor(
    public override http: HttpClient,
    public override helpers: HelpersService
  ) {
    super(http, helpers);
    this.endpoint = "sub-district";
  }
}
