- up = us.up;
- down = us.down;
- return * this;
- };
- operator USER_STAT() const
- {
- USER_STAT us;
- us.cash = cash;
- us.freeMb = freeMb;
- us.lastCashAdd = lastCashAdd;
- us.lastCashAddTime = lastCashAddTime;
- us.passiveTime = passiveTime;
- us.lastActivityTime = lastActivityTime;
- us.up = up;
- us.down = down;
- return us;
- };
-
- RESETABLE<double> cash;
- RESETABLE<double> freeMb;
- RESETABLE<double> lastCashAdd;
- RESETABLE<time_t> lastCashAddTime;
- RESETABLE<time_t> passiveTime;
- RESETABLE<time_t> lastActivityTime;
- RESETABLE<DIR_TRAFF> up;
- RESETABLE<DIR_TRAFF> down;
+ sessionUp = us.sessionUp;
+ sessionDown = us.sessionDown;
+ monthUp = us.monthUp;
+ monthDown = us.monthDown;
+ return *this;
+ }
+
+ UserStatOpt(const UserStatOpt&) = default;
+ UserStatOpt& operator=(const UserStatOpt&) = default;
+ UserStatOpt(UserStatOpt&&) = default;
+ UserStatOpt& operator=(UserStatOpt&&) = default;
+
+ Optional<double> cash;
+ Optional<CashInfo> cashAdd;
+ Optional<CashInfo> cashSet;
+ Optional<double> freeMb;
+ Optional<double> lastCashAdd;
+ Optional<time_t> lastCashAddTime;
+ Optional<time_t> passiveTime;
+ Optional<time_t> lastActivityTime;
+ DirTraffOpt sessionUp;
+ DirTraffOpt sessionDown;
+ DirTraffOpt monthUp;
+ DirTraffOpt monthDown;