module.exports = {
  className: "Order",
  fields: {
    user: { type: 'Pointer', targetClass: '_User', required: true },
    orderNumber: { type: 'String', required: true },
    orderDate: { type: 'Date', required: true },
    totalAmount: { type: 'Number', required: true },
    status: { 
      type: 'String', 
      required: true,
      defaultValue: 'pending',
      options: ['pending', 'paid', 'shipped', 'completed', 'cancelled']
    },
    shippingMethod: { type: 'String' }  // 添加自定义字段
  }
};