manager-app/manager_api_new/lib/model/scene3_d_dto.dart
Thomas Fransolet c8947880ba Ecran VR, section Scene3D et medias immersifs
Canal VR
- L'entree VR affiche VrScreen au lieu de « non configuree » : sous-onglet
  Configuration (AppConfigurationLinkScreen reutilise) et sous-onglet Casques
  (pincode d'appairage, etat, batterie, version, dernier vu).
- Le dialogue de plan SuperAdmin porte aussi les canaux et les add-ons
  (assistant, contenu immersif). Activer un canal cree son
  ApplicationInstance s'il n'existe pas ; le desactiver ne supprime rien.

Medias immersifs
- Types Image360, Video360, Model3D : icones, libelles, extensions, apercu
  dans la Mediatheque et facettes.
- Au depot, la pastille de type bascule Image <-> Image 360 et
  Video <-> Video 360 : rien dans un .jpg ne dit qu'il est
  equirectangulaire. Un .glb est reconnu seul.
- ImageCompressor ne touche plus aux 360 ni aux GLB, sur les deux chemins
  d'upload : ramenee a 2560 px, une equirectangulaire devient illisible dans
  un casque.

Scene3D
- Nouveau type de section (famille des lieux) et son ecran de configuration :
  modele, mode objet/decor, points d'interet.
- Fond immersif d'une configuration, visible si l'instance a l'add-on : le
  type est deduit de la ressource choisie, avec une image de repli.

Client API edite a la main en miroir du backend : SectionScene3DApi,
Scene3DDTO, ImmersiveBackgroundDTO, Position3D, AppType sur les devices,
ResourceType etendu. Libelles FR/EN/NL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 16:54:13 +02:00

300 lines
8.0 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
/// Une scene 3D — un objet ou un decor — et ses points d'interet (item E7 du lot XR-4).
///
/// Le modele arrive par un id de ressource `Model3D`, comme une image ou une video :
/// rien de particulier dans la mediatheque, et le telechargement hors ligne l'emporte
/// avec le reste de la visite.
class Scene3DDTO {
Scene3DDTO({
this.id,
this.label,
this.title = const [],
this.description = const [],
this.isActive,
this.imageId,
this.imageSource,
this.configurationId,
this.isSubSection,
this.parentId,
this.type,
this.dateCreation,
this.order,
this.instanceId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.isBeacon,
this.beaconId,
this.model3DResourceId,
this.model3DSource,
this.mode,
this.points = const [],
});
String? id;
String? label;
List<TranslationDTO>? title;
List<TranslationDTO>? description;
bool? isActive;
String? imageId;
String? imageSource;
String? configurationId;
bool? isSubSection;
String? parentId;
SectionType? type;
DateTime? dateCreation;
int? order;
String? instanceId;
String? latitude;
String? longitude;
int? meterZoneGPS;
bool? isBeacon;
int? beaconId;
/// Ressource `Model3D` (glTF binaire) affichee par cette section.
String? model3DResourceId;
/// URL du modele, remplie a la lecture comme `imageSource`.
String? model3DSource;
/// Objet manipule (0) ou decor habite (1).
Scene3DMode? mode;
/// Points poses sur le modele. Meme objet que ceux d'une carte : seule leur
/// position change de nature.
List<GeoPointDTO>? points;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Scene3DDTO &&
other.id == id &&
other.label == label &&
other.model3DResourceId == model3DResourceId &&
other.model3DSource == model3DSource &&
_deepEquality.equals(other.points, points);
@override
int get hashCode =>
(id == null ? 0 : id!.hashCode) +
(label == null ? 0 : label!.hashCode) +
(model3DResourceId == null ? 0 : model3DResourceId!.hashCode) +
(model3DSource == null ? 0 : model3DSource!.hashCode) +
(points == null ? 0 : points!.hashCode);
@override
String toString() =>
'Scene3DDTO[id=$id, label=$label, model3DResourceId=$model3DResourceId, points=$points]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.label != null) {
json[r'label'] = this.label;
} else {
json[r'label'] = null;
}
if (this.title != null) {
json[r'title'] = this.title;
} else {
json[r'title'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.isActive != null) {
json[r'isActive'] = this.isActive;
} else {
json[r'isActive'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.configurationId != null) {
json[r'configurationId'] = this.configurationId;
} else {
json[r'configurationId'] = null;
}
if (this.isSubSection != null) {
json[r'isSubSection'] = this.isSubSection;
} else {
json[r'isSubSection'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.type != null) {
json[r'type'] = this.type;
} else {
json[r'type'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.instanceId != null) {
json[r'instanceId'] = this.instanceId;
} else {
json[r'instanceId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.model3DResourceId != null) {
json[r'model3DResourceId'] = this.model3DResourceId;
} else {
json[r'model3DResourceId'] = null;
}
if (this.model3DSource != null) {
json[r'model3DSource'] = this.model3DSource;
} else {
json[r'model3DSource'] = null;
}
if (this.mode != null) {
json[r'mode'] = this.mode;
} else {
json[r'mode'] = null;
}
if (this.points != null) {
json[r'points'] = this.points;
} else {
json[r'points'] = null;
}
return json;
}
static Scene3DDTO? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return Scene3DDTO(
id: mapValueOfType<String>(json, r'id'),
label: mapValueOfType<String>(json, r'label'),
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
isActive: mapValueOfType<bool>(json, r'isActive'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
configurationId: mapValueOfType<String>(json, r'configurationId'),
isSubSection: mapValueOfType<bool>(json, r'isSubSection'),
parentId: mapValueOfType<String>(json, r'parentId'),
type: SectionType.fromJson(json[r'type']),
dateCreation: mapDateTime(json, r'dateCreation', r''),
order: mapValueOfType<int>(json, r'order'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
model3DResourceId: mapValueOfType<String>(json, r'model3DResourceId'),
model3DSource: mapValueOfType<String>(json, r'model3DSource'),
mode: Scene3DMode.fromJson(json[r'mode']),
points: GeoPointDTO.listFromJson(json[r'points']),
);
}
return null;
}
static List<Scene3DDTO> listFromJson(dynamic json, {bool growable = false,}) {
final result = <Scene3DDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Scene3DDTO.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Scene3DDTO> mapFromJson(dynamic json) {
final map = <String, Scene3DDTO>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
final value = Scene3DDTO.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
static const requiredKeys = <String>{};
}