"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.binaryOrderUpdateSchema=exports.orderSchema=exports.baseBinaryOrderSchema=void 0;const schema_1=require("@b/utils/schema"),id={...(0,schema_1.baseStringSchema)("ID of the binary order"),nullable:!0},userId={...(0,schema_1.baseStringSchema)("User ID associated with the order"),nullable:!0},symbol=(0,schema_1.baseStringSchema)("Trading symbol"),price=(0,schema_1.baseNumberSchema)("Price at order placement"),amount=(0,schema_1.baseNumberSchema)("Amount traded"),profit=(0,schema_1.baseNumberSchema)("Profit from the order"),side=(0,schema_1.baseEnumSchema)("Side of the order",["RISE","FALL"]),type=(0,schema_1.baseEnumSchema)("Type of the order",["RISE_FALL"]),status=(0,schema_1.baseEnumSchema)("Status of the order",["PENDING","WIN","LOSS","DRAW"]),isDemo=(0,schema_1.baseBooleanSchema)("Flag indicating if the order is a demo"),closePrice={...(0,schema_1.baseNumberSchema)("Price at order close"),nullable:!0};exports.baseBinaryOrderSchema={id:id,userId:userId,symbol:symbol,price:price,amount:amount,profit:profit,side:side,type:type,status:status,isDemo:isDemo,closePrice:closePrice};exports.orderSchema={...exports.baseBinaryOrderSchema,user:{type:"object",properties:{id:{type:"string",description:"User ID"},firstName:{type:"string",description:"User's first name",nullable:!0},lastName:{type:"string",description:"User's last name",nullable:!0},avatar:{type:"string",description:"User's avatar",nullable:!0}},nullable:!0}};exports.binaryOrderUpdateSchema={type:"object",properties:{symbol:symbol,price:price,amount:amount,profit:profit,side:side,type:type,status:status,isDemo:isDemo,closePrice:closePrice},required:["symbol","price","amount","side","status","closePrice"]};