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

export interface User extends Timestamp {
  id: string;
  title: string;
  desc: string;
  order: number;
  urole_id: string;
  username: string;
  fullname: string;
  shortname: string;
  email: string;
  avatar: string;
  note: string;
  status: boolean;
  is_ban: boolean;
  google_id: string;
  phone: string;
}

@Injectable({
  providedIn: "root",
})
export class UserService extends ApiService<User> {
  constructor(
    public override http: HttpClient,
    public override helpers: HelpersService
  ) {
    super(http, helpers);
    this.endpoint = "users";
  }
}
