Enhance sales schemas with synchronization fields
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Added `syncHash`, `syncImageHash`, and `marketplaceImageUrls` fields to the `listing`, `listingVariant`, and `marketplaceMapping` schemas to support improved synchronization and image management across marketplaces.
This commit is contained in:
parent
cdc7b860ac
commit
ae2cefb183
@ -42,6 +42,9 @@ const listingSchema = new Schema(
|
||||
price: { type: Number, required: false },
|
||||
currency: { type: String, required: false },
|
||||
lastSyncedAt: { type: Date, required: false },
|
||||
syncHash: { type: String, required: false },
|
||||
syncImageHash: { type: String, required: false },
|
||||
marketplaceImageUrls: [{ type: String, required: false }],
|
||||
stockQuantity: { type: Number, required: false, default: 0 },
|
||||
condition: {
|
||||
type: String,
|
||||
|
||||
@ -47,6 +47,9 @@ const listingVarientSchema = new Schema(
|
||||
priceTaxRate: { type: Schema.Types.ObjectId, ref: 'taxRate', required: false },
|
||||
priceWithTax: { type: Number, required: false },
|
||||
lastSyncedAt: { type: Date, required: false },
|
||||
syncHash: { type: String, required: false },
|
||||
syncImageHash: { type: String, required: false },
|
||||
marketplaceImageUrls: [{ type: String, required: false }],
|
||||
listingImages: [{ type: Schema.Types.ObjectId, ref: 'file', required: false }],
|
||||
stockQuantity: { type: Number, required: false, default: 0 },
|
||||
},
|
||||
|
||||
@ -9,6 +9,7 @@ export function marketplaceSyncMappingSchema() {
|
||||
{
|
||||
marketplace: { type: Schema.Types.ObjectId, ref: 'marketplace', required: true },
|
||||
externalReference: { type: String, required: false },
|
||||
syncHash: { type: String, required: false },
|
||||
state: {
|
||||
type: {
|
||||
type: String,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user