export interface User {
  id: string;
  email: string;
  name: string;
  designation: string;
  phone: string;
  avatar: string;
  createdAt: string;
  password?: string;
  isVerified?: boolean;
  status?: 'Pending' | 'Approved' | 'Rejected' | 'On-Hold';
  refId?: string;
  googleId?: string;
  role?: 'User' | 'Admin';
  department?: string;
  managerId?: string;
  address?: string;
  isEmployee?: boolean;
  staffId?: string;
  staffStatus?: 'Active' | 'Hold' | 'Delete' | string;
  reportingHierarchy?: string;
  orderQty?: number;
  shipQty?: number;
  totalAmount?: number;
  receivedAmount?: number;
}

export interface Factory {
  id: string;
  userId: string;
  name: string;
  location: string;
  address?: string;
  size?: string;
  qcStaff?: number;
  rdStaff?: number;
  productionLines?: number;
  annualOutput?: string;
  leadTime?: string;
  type: string;
  capacity: string;
  verificationId: string;
  verificationDoc?: string;
  logoUrl?: string;
  status: 'Pending' | 'Approved' | 'Rejected' | 'On-Hold';
  rating?: number;
  createdAt: string;
  creatorEmail?: string;
  creatorName?: string;
  creatorPhone?: string;
}

export interface Product {
  id: string;
  factoryId: string;
  title: string;
  category: string;
  description: string;
  image: string;
  createdAt: string;
}

export interface JobPost {
  id: string;
  userId: string;
  userName: string;
  title: string;
  styleNumber: string;
  category: string;
  garmentItem?: string;
  description: string;
  quantity: number;
  budget?: string;
  fobBudget: number;
  smv: number;
  colorsCount: number;
  poCount: number;
  targetDate: string;
  images?: string[];
  videoUrl?: string;
  status: 'Active' | 'Closed' | 'Filled';
  createdAt: string;
  isClosed?: boolean;
  isProceed?: boolean;
  proceed_status?: string;
  bids?: JobApplication[];
  assigned_staff_id?: string;
  assigned_employee_code?: string;
  assigned_employee_name?: string;
  assigned_employee_phone?: string;
  order_number?: string;
  shipment_status?: string;
  payment_status?: string;
  commission_status?: string;
}

export interface JobApplication {
  id: string;
  jobId: string;
  jobTitle: string;
  userId: string;
  userName: string;
  factoryId: string;
  factoryName: string;
  priceBid: string;
  coverNote: string;
  status: 'Pending' | 'Approved' | 'Rejected';
  createdAt: string;
}

export interface Notification {
  id: string;
  userId: string;
  text: string;
  isRead: boolean;
  createdAt: string;
}

export interface DashboardStats {
  activeFactoriesCount: number;
  userProductsCount: number;
  userJobPostsCount: number;
  jobApplicationsCount: number;
  notificationsCount: number;
  totalUsersCount?: number;
  totalFactoriesCount?: number;
  totalJobsCount?: number;
  totalNeedOrdersCount?: number;
}

export interface CapacityQuote {
  id: string;
  userId: string;
  userName: string;
  category: string;
  quantity: number;
  targetBudget: number;
  styleName?: string;
  smv?: number;
  samplePhotos?: string[];
  specDescription?: string;
  status: 'Pending' | 'Approved' | 'Rejected';
  createdAt: string;
}

export interface NeedOrderPost {
  id: string;
  userId: string;
  userName: string;
  title?: string;
  factoryId: string;
  factoryName: string;
  factoryLogo?: string;
  factoryLocation?: string;
  category: string;
  garmentItem?: string;
  styleNumber?: string;
  smv?: number;
  samplePhotos?: string[];
  images?: string[];
  quantity: number;
  sewingStartDate: string;
  createdAt: string;
  isClosed?: boolean;
  isProceed?: boolean;
  proceed_status?: string;
  quotes?: CapacityQuote[];
  assigned_staff_id?: string;
  assigned_employee_code?: string;
  assigned_employee_name?: string;
  assigned_employee_phone?: string;
  order_number?: string;
  shipment_status?: string;
  payment_status?: string;
  commission_status?: string;
}

export interface AdSpaceVideo {
  id: string;
  spotNumber: number;
  title: string;
  videoUrl: string;
  thumbnailUrl?: string;
  caption?: string;
  isActive: boolean;
  updatedAt: string;
}

export interface GarmentCategory {
  id: string;
  name: string;
  code?: string;
  description?: string;
  status: 'Active' | 'Inactive';
  createdAt: string;
}

export interface GarmentItem {
  id: string;
  category: string;
  name: string;
  code?: string;
  description?: string;
  status: 'Active' | 'Inactive';
  createdAt: string;
}

export interface GarmentCategoryItem {
  id: string;
  category: string;
  item: string;
  code?: string;
  description?: string;
  status: 'Active' | 'Inactive';
  createdAt: string;
}


