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
Option | Type | Default | Description |
---|---|---|---|
isRequired | Boolean | false | Does this field require a value? |
isUnique | Boolean | false | Adds a unique index that allows only unique values to be stored |