| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const { Integer, Checkbox, Text, Decimal, DateTime, Uuid, Relationship } = require('@keystonejs/fields');
- module.exports = {
- fields: {
- items_id: { type: Uuid, isRequired: true, label: 'Egzemplarz' },
- article_id: { type: Uuid, many: false, label: 'article' },
- productsguid_id: { type: Uuid, many: false, label: 'productsguid' },
- itype: { type: Integer, isRequired: true, label: 'itype' },
- sold: { type: Checkbox, isRequired: true, label: 'sold' },
- deficiency: { type: Checkbox, isRequired: true, label: 'deficiency' },
- catnum: { type: Text, label: 'catnum' },
- 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: 'Cena detaliczna brutto' },
- price_eshop: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Cena esklep' },
- profit_margin: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Marża' },
- isize: { type: Text, isRequired: true, label: 'isize' },
- mass: { type: Decimal, knexOptions: { precision: 10, scale: 2 }, label: 'Masa' },
- quantity: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'Ilość' },
- barcode: { type: Text, label: 'Kod kreskowy' },
- tagged: { type: Checkbox, isRequired: true, label: 'tagged' },
- currency_id: { type: Relationship, ref: 'currency.currency_id', many: false, label: 'Waluta' },
- producer: { type: Text, label: 'Producent' },
- symbol_prod: { type: Text, label: 'Symbol producenta' },
- silver_price: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Koszt srebra' },
- gold_price: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Koszt złota' },
- platin_price: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Koszt platyny' },
- purchase_date: { type: DateTime, label: 'Data zakupu' },
- promo: { type: Checkbox, isRequired: true, label: 'promo' },
- news: { type: Checkbox, isRequired: true, label: 'news' },
- best: { type: Checkbox, isRequired: true, label: 'best' },
- name: { type: Text, label: 'Nazwa' },
- desctxt: { type: Text, label: 'desctxt' },
- seotxt: { type: Text, label: 'seotxt' },
- eshop: { type: Checkbox, isRequired: true, label: 'E-sklep' },
- created_at: { type: DateTime, format: 'DD.MM.YYYY h:mm', isRequired: true, label: 'Utworzono' },
- modified_at: { type: DateTime, format: 'DD.MM.YYYY h:mm', isRequired: true, label: 'Zmieniono' },
- sup_id: { type: Relationship, ref: 'suppliers.suppliers_id', many: false, label: 'suppliers_id' },
- pzdoc_id: { type: Uuid, many: false, label: 'pzdoc' },
- kinds_id: { type: Relationship, ref: 'kinds.kinds_id', many: true, label: 'kinds' },
- uom_id: { type: Relationship, ref: 'uom.uom_id', many: false, label: 'uom' },
- materials_id: { type: Relationship, ref: 'materials.materials_id', many: true, label: 'materials' },
- vat_id: { type: Relationship, ref: 'vat.vat_id', many: false, isRequired: true, label: 'VAT' },
- locations_id: { type: Relationship, ref: 'locations.locations_id', many: true, label: 'locations' },
- deliveryitems_id: { type: Relationship, ref: 'deliveryitems.deliveryitems_id', many: true, label: 'deliveryitems' },
- shops_id: { type: Relationship, ref: 'shops.shops_id', many: true, isRequired: true, label: 'Magazyn' },
- tagsoper_id: { type: Relationship, ref: 'operators.operators_id', many: false, label: 'tagsoper' }, // todo: spr. czy o to chodziło w foreign keys oryginalnej bazy
- price_delivery_before_discount: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Koszt dostawy przed rabatem' },
- fifo_value: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'fifo_value' },
- fifo: { type: Checkbox, label: 'fifo' },
- fifo_last_price: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'fifo_last_price' },
- transit: { type: Checkbox, isRequired: true, label: 'Transport' },
- transit_symbol: { type: Text, label: 'Symbol transportu' },
- transit_proofsymbol: { type: Text, label: 'transit_proofsymbol' },
- transit_currency_id: { type: Relationship, ref: 'currency.currency_id', many: false, label: 'Waluta transportu' },
- transit_currency_rate: { type: Decimal, knexOptions: { precision: 12, scale: 4 }, label: 'transit_currency_rate' },
- transit_purchase_costs: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'transit_purchase_costs' },
- transit_currency_material_rate: { type: Decimal, knexOptions: { precision: 12, scale: 4 }, label: 'transit_currency_material_rate' },
- quantity_precision: { type: Integer, isRequired: true, label: 'quantity_precision' },
- }, label: 'Article'//, plural: 'Articles'
- };
|