Skip to content

Commit

Permalink
chore: create warehouse config
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis authored Jul 5, 2024
1 parent f5f29c7 commit 9aa4490
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions functions/ecom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,89 @@ const app = {
}
},
hide: true
},
warehouses: {
schema: {
title: 'Armazéns (multi CD)',
description: 'Origens e destinos para cada centro de distribuição',
type: 'array',
maxItems: 30,
items: {
title: 'Centro de distribuição',
type: 'object',
required: ['zip'],
additionalProperties: false,
properties: {
code: {
type: 'string',
maxLength: 30,
pattern: '^[A-Za-z0-9-_]{2,30}$',
title: 'Código do CD'
},
doc: {
type: 'string',
maxLength: 255,
title: 'Documento da filial',
description: 'CNPJ da filial associado à sua conta Jadlog'
},
zip: {
type: 'string',
maxLength: 9,
pattern: '^[0-9]{5}-?[0-9]{3}$',
title: 'CEP de origem',
description: 'Código postal do remetente para cálculo do frete'
},
posting_deadline: {
title: 'Prazo de envio do CD',
type: 'object',
required: ['days'],
additionalProperties: false,
properties: {
days: {
type: 'integer',
minimum: 0,
maximum: 999999,
title: 'Número de dias',
description: 'Dias de prazo para postar os produtos após a compra'
},
working_days: {
type: 'boolean',
default: true,
title: 'Dias úteis'
},
after_approval: {
type: 'boolean',
default: true,
title: 'Após aprovação do pagamento'
}
}
},
zip_range: {
title: 'Faixa de CEP atendida',
type: 'object',
required: [
'min',
'max'
],
properties: {
min: {
type: 'integer',
minimum: 10000,
maximum: 999999999,
title: 'CEP inicial'
},
max: {
type: 'integer',
minimum: 10000,
maximum: 999999999,
title: 'CEP final'
}
}
}
}
}
},
hide: true
}
}
}
Expand Down

0 comments on commit 9aa4490

Please sign in to comment.