CREATE TABLE TBPDV_OPERADOR (
    ID INTEGER NOT NULL,
    PDV_ID INTEGER,
    CODIGO_OPERADOR INTEGER,
    USUARIO_ID INTEGER,
    TIPO_OPERADOR VARCHAR(1) CHARACTER SET UTF8 DEFAULT '1' COLLATE UTF8);
	
ALTER TABLE TBPDV_OPERADOR
ADD CONSTRAINT PK_TBPDV_OPERADOR
PRIMARY KEY (ID);

CREATE SEQUENCE GTBPDV_OPERADOR;

CREATE TRIGGER TTBPDV_OPERADOR_B0I FOR TBPDV_OPERADOR
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.ID IS NULL) THEN
    NEW.ID = GEN_ID(GTBPDV_OPERADOR,1);
END;

function randomGen($min, $max) {
    $number = rand($min, $max);
	//shuffle($numbers);
	//return array_slice($numbers, 0, $quantity);
	return $number;
}

print_r(randomGen(0,1234514548*99).'5875');

//$numbers = range(1, 12345*99);
//shuffle($numbers);

//var_dump($numbers);