fifopart.js 1.5 KB

1234567891011121314151617181920212223
  1. const { Text, DateTime, Decimal, Relationship } = require('@keystonejs/fields');
  2. const { AutoIncrement } = require('@keystonejs/fields-auto-increment');
  3. module.exports = {
  4. fields: {
  5. fifopart_id: { type: AutoIncrement, isRequired: true, label: 'fifopart' },
  6. pos_id: { type: Relationship, ref: 'positions', many: true, label: 'pos_id' },
  7. pos_corrsrc_id: { type: Relationship, ref: 'positions', many: false, label: 'pos_corrsrc' },
  8. type: { type: Text, label: 'Typ' },
  9. state: { type: Text, label: 'state' },
  10. id: { type: Text, label: 'id' },
  11. shops_id: { type: Relationship, ref: 'shops', many: true, isRequired: true, label: 'Magazyn' },
  12. items_id: { type: Relationship, ref: 'items', many: true, label: 'Egzemplarz' },
  13. date_part: { type: DateTime, isRequired: true, label: 'date_part' },
  14. quantity: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'Ilosc' },
  15. price_purchase: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_purchase' },
  16. value: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'value' },
  17. quantity2: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'quantity2' },
  18. value2: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'value2' },
  19. xyz: { type: Text, label: 'xyz' },
  20. price_orig: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_orig' },
  21. }, label: 'Fifopart'//, plural: 'Fifoparts'
  22. };