Mongolid\Schema\Schema::sequence PHP Метод

sequence() публичный Метод

Prepares the field to have a sequence. If $value is zero or not defined a new auto-increment number will be "generated" for the collection of the schema. The sequence generation is done by the SequenceService.
public sequence ( integer $value = null ) : integer
$value integer Value that will be evaluated.
Результат integer
    public function sequence(int $value = null)
    {
        if ($value) {
            return $value;
        }
        return Ioc::make(SequenceService::class)->getNextValue($this->collection ?: $this->entityClass);
    }