syntax = "proto3";
option go_package = "./pb";

package pb;

import "models/model_user.proto";
import "models/model_order_method.proto";

// 用户订单
message UserOrder {
	int64 userId = 2;
	string code = 3;
	string type = 4;
	int64 orderMethodId = 5;
	string status = 6;
	float amount = 7;
	bytes paramsJSON = 8;
	int64 createdAt = 9;
	int64 cancelledAt = 10;
	int64 finishedAt = 11;
	bool isExpired = 12;

	User user = 30;
	OrderMethod orderMethod = 31;

	bool canPay = 32; // 是否可以支付
	string payURL = 33; // 构造后的支付URL
}