Nhảy tới nội dung

Integer

Lưu ý sau khi phiên bản KeystoneJS 5 chuyển sang chế độ duy trì để ra mắt phiên bản mới hơn. Chúng tôi đã dựa trên mã nguồn cũ này để phát triển một phiên bản khác với một số tính năng theo hướng microservices.

A whole number.

Usage

const { Integer, Text } = require("@ocop/fields");

ocop.createList("Review", {
fields: {
comments: { type: Text },
rating: { type: Integer },
},
});

Config

OptionTypeDefaultDescription
isRequiredBooleanfalseDoes this field require a value?
isUniqueBooleanfalseAdds a unique index that allows only unique values to be stored