export function generateId(): number {
  const length = 8;
  const timestamp = +new Date();
  const ts = timestamp.toString();
  const parts = ts.split('').reverse();
  let id = '';

  for (let i = 0; i < length; ++i) {
    const index = Math.floor(Math.random() * (parts.length - 1 - 1));
    id += parts[index];
  }

  return +id;
}

// export function getRandomInt(min: number, max: number): number {
//   return Math.floor(Math.random() * (max - min + 1)) + min;
// }
