module.exports = {
  className: "OrderItem",
  fields: {
    order: { type: 'Pointer', targetClass: 'Order', required: true },
    product: { type: 'Pointer', targetClass: 'Product', required: true },
    quantity: { type: 'Number', required: true, defaultValue: 1 },
    unitPrice: { type: 'Number', required: true },
    discount: { type: 'Number' }  // 添加自定义字段
  }
};