XJ music engine  1.9.6
In-game runtime engine for XJ music.
Project.h
Go to the documentation of this file.
1 // Copyright (c) XJ Music Inc. (https://xjmusic.com) All Rights Reserved.
2 
3 #ifndef XJMUSIC_PROJECT_H
4 #define XJMUSIC_PROJECT_H
5 
6 #include <string>
7 
9 #include "ContentEntity.h"
10 
11 namespace XJ {
12 
13  class Project : public ContentEntity {
14  public:
15 
16  Project() = default;
17 
18  std::string name;
19  std::string platformVersion;
20  bool isDeleted{false};
22  };
23 
29  inline void from_json(const json &json, Project &entity) {
30  EntityUtils::setRequired(json, "id", entity.id);
31  EntityUtils::setIfNotNull(json, "name", entity.name);
32  EntityUtils::setIfNotNull(json, "platformVersion", entity.platformVersion);
33  EntityUtils::setIfNotNull(json, "isDeleted", entity.isDeleted);
34  EntityUtils::setIfNotNull(json, "updatedAt", entity.updatedAt);
35  }
36 
37 }// namespace XJ
38 
39 #endif//XJMUSIC_PROJECT_H
nlohmann::json json
Definition: EntityUtils.h:14
Definition: ContentEntity.h:12
UUID id
Definition: ContentEntity.h:17
static long long currentTimeMillis()
Definition: EntityUtils.h:62
static void setIfNotNull(const json &json, const std::string &key, std::string &value)
Definition: EntityUtils.cpp:27
static void setRequired(const json &json, const std::string &key, UUID &value)
Definition: EntityUtils.cpp:16
Definition: Project.h:13
std::string platformVersion
Definition: Project.h:19
Project()=default
long long updatedAt
Definition: Project.h:21
std::string name
Definition: Project.h:18
bool isDeleted
Definition: Project.h:20
Definition: ActiveAudio.h:11
void from_json(const json &json, Instrument &entity)
Definition: Instrument.h:106