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