products_minmax.js 884 B

1234567891011121314
  1. const { DateTime, Decimal, Relationship } = require('@keystonejs/fields');
  2. const { AutoIncrement } = require('@keystonejs/fields-auto-increment');
  3. module.exports = {
  4. fields: {
  5. products_minmax_id: { type: AutoIncrement, isRequired: true, label: 'products_minmax' },
  6. products_id: { type: Relationship, ref: 'products', many: true, isRequired: true, label: 'products' },
  7. shops_id: { type: Relationship, ref: 'shops', many: true, isRequired: true, label: 'Magazyn' },
  8. date_from: { type: DateTime, label: 'Od' },
  9. date_to: { type: DateTime, label: 'Do' },
  10. min: { type: Decimal, knexOptions: { precision: 10, scale: 4 }, isRequired: true, label: 'min' },
  11. max: { type: Decimal, knexOptions: { precision: 10, scale: 4 }, isRequired: true, label: 'max' },
  12. }, label: 'Products_minmax'//, plural: 'Products_minmaxs'
  13. };