const { Text, Uuid, Decimal, Integer, Checkbox, DateTime, Relationship } = require('@keystonejs/fields'); const { AutoIncrement } = require('@keystonejs/fields-auto-increment'); module.exports = { fields: { id: { type: Integer, isRequired: true, label: 'products' }, productsguid_id: { type: Uuid, many: false, label: 'productsguid' }, catnum: { type: Text, label: 'catnum' }, symbol_supplier: { type: Text, label: 'symbol_supplier' }, description: { type: Text, label: 'description' }, price_delivery: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_delivery' }, price_purchase: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_purchase' }, price_detal: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_detal' }, price_detal_brutto: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_detal_brutto' }, price_eshop: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Cena esklep' }, profit_margin: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Marza' }, isize: { type: Text, isRequired: true, label: 'isize' }, mass: { type: Decimal, knexOptions: { precision: 10, scale: 2 }, label: 'Masa' }, productiondays: { type: Integer, label: 'Czas prukcji' }, promo: { type: Checkbox, isRequired: true, label: 'Promocja' }, news: { type: Checkbox, isRequired: true, label: 'news' }, best: { type: Checkbox, isRequired: true, label: 'best' }, name: { type: Text, label: 'Nazwa' }, desctxt: { type: Text, label: 'Opis' }, seotxt: { type: Text, label: 'SEO' }, eshop: { type: Checkbox, isRequired: true, label: 'esklep' }, created_at: { type: DateTime, format: 'DD.MM.YYYY h:mm', isRequired: true, label: 'Stworzono:' }, modified_at: { type: DateTime, format: 'DD.MM.YYYY h:mm', isRequired: true, label: 'Zmodyfikowano:' }, currency_id: { type: Relationship, ref: 'currency', many: false, label: 'Waluta' }, kinds_id: { type: Relationship, ref: 'kinds', many: false, label: 'Rodzaje' }, uom_id: { type: Relationship, ref: 'uom', many: false, label: 'uom' }, materials_id: { type: Relationship, ref: 'materials', many: false, label: 'Surowiec' }, vat_id: { type: Relationship, ref: 'vat', many: false, label: 'VAT' }, productsgroup_id: { type: Relationship, ref: 'productsgroup', many: false, label: 'productsgroup' }, suppliers_id: { type: Relationship, ref: 'suppliers', many: false, label: 'Dostawca' }, custom1: { type: Text, label: 'Dane 1' }, custom2: { type: Text, label: 'Dane 2' }, custom3: { type: Text, label: 'Dane 3' }, custom4: { type: Text, label: 'Dane 4' }, custom5: { type: Text, label: 'Dane 5' }, qdec: { type: Integer, label: 'qdec' }, fifo: { type: Checkbox, label: 'fifo' }, barcode: { type: Text, label: 'barcode' }, price_detal_per_uom: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_detal_per_uom' }, price_detal_per_uom_brutto: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_detal_per_uom_brutto' }, minmax_active: { type: Checkbox, isRequired: true, label: 'Min/Max' }, auto_order: { type: Checkbox, isRequired: true, label: 'auto_order' }, }, label: 'Product'//, plural: 'Productss' };