const { Text, DateTime, Decimal, Relationship } = require('@keystonejs/fields'); const { AutoIncrement } = require('@keystonejs/fields-auto-increment'); module.exports = { fields: { fifopart_id: { type: AutoIncrement, isRequired: true, label: 'fifopart' }, pos_id: { type: Relationship, ref: 'positions', many: true, label: 'pos_id' }, pos_corrsrc_id: { type: Relationship, ref: 'positions', many: false, label: 'pos_corrsrc' }, type: { type: Text, label: 'Typ' }, state: { type: Text, label: 'state' }, id: { type: Text, label: 'id' }, shops_id: { type: Relationship, ref: 'shops', many: true, isRequired: true, label: 'Magazyn' }, items_id: { type: Relationship, ref: 'items', many: true, label: 'Egzemplarz' }, date_part: { type: DateTime, isRequired: true, label: 'date_part' }, quantity: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'Ilosc' }, price_purchase: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_purchase' }, value: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'value' }, quantity2: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'quantity2' }, value2: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'value2' }, xyz: { type: Text, label: 'xyz' }, price_orig: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_orig' }, }, label: 'Fifopart'//, plural: 'Fifoparts' };