Wip handle new entities and updates for visitNamur
This commit is contained in:
parent
89d613505a
commit
9d099a201c
@ -158,7 +158,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
image: resourceDTO != null ? resourceDTO.type != null ? new DecorationImage(
|
image: resourceDTO != null ? resourceDTO.type != null ? new DecorationImage(
|
||||||
fit: widget.imageFit,
|
fit: widget.imageFit,
|
||||||
image: new NetworkImage(
|
image: new NetworkImage(
|
||||||
resourceDTO.type! == ResourceType.Image ? (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resourceDTO.id! : resourceDTO.data!,
|
resourceDTO.url!, // TODO handle multiple type of content
|
||||||
),
|
),
|
||||||
) : null : null,
|
) : null : null,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
|||||||
@ -28,13 +28,11 @@ class _ResourceTabState extends State<ResourceTab> with SingleTickerProviderStat
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
tabsToShow.add(new Tab(text: "Image local"));
|
tabsToShow.add(new Tab(text: "Local"));
|
||||||
tabsToShow.add(new Tab(text: "Image en ligne"));
|
tabsToShow.add(new Tab(text: "En ligne"));
|
||||||
tabsToShow.add(new Tab(text: "Audio local"));
|
|
||||||
//tabsToShow.add(new Tab(text: "Vidéo en ligne"));
|
|
||||||
|
|
||||||
_tabController = new TabController(length: 3, vsync: this);
|
_tabController = new TabController(length: 2, vsync: this);
|
||||||
_tabController!.addListener(_handleTabSelection);
|
//_tabController!.addListener(_handleTabSelection);
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
@ -66,28 +64,28 @@ class _ResourceTabState extends State<ResourceTab> with SingleTickerProviderStat
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleTabSelection() {
|
/*void _handleTabSelection() {
|
||||||
switch(_tabController!.index) {
|
switch(_tabController!.index) {
|
||||||
case 0:
|
case 0:
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.resourceDTO.data = null;
|
widget.resourceDTO.url = null;
|
||||||
widget.resourceDTO.type = ResourceType.Image;
|
widget.resourceDTO.type = ResourceType.Image;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.resourceDTO.data = null;
|
widget.resourceDTO.url = null;
|
||||||
widget.resourceDTO.type = ResourceType.ImageUrl;
|
widget.resourceDTO.type = ResourceType.ImageUrl;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.resourceDTO.data = null;
|
widget.resourceDTO.url = null;
|
||||||
widget.resourceDTO.type = ResourceType.Audio;
|
widget.resourceDTO.type = ResourceType.Audio;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUploadWeb) {
|
getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUploadWeb) {
|
||||||
@ -97,7 +95,7 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload
|
|||||||
tabsToShow.add(
|
tabsToShow.add(
|
||||||
new Padding(
|
new Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
child: UploadImageContainer(
|
child: UploadContentContainer(
|
||||||
onChanged: (List<File>? files) {
|
onChanged: (List<File>? files) {
|
||||||
onFileUpload(files);
|
onFileUpload(files);
|
||||||
resourceDTO.type = ResourceType.Image;
|
resourceDTO.type = ResourceType.Image;
|
||||||
@ -123,8 +121,8 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Audio local
|
// Audio
|
||||||
tabsToShow.add(
|
/*tabsToShow.add(
|
||||||
new Padding(
|
new Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
child: UploadAudioContainer(
|
child: UploadAudioContainer(
|
||||||
@ -140,8 +138,25 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Video
|
||||||
|
tabsToShow.add(
|
||||||
|
new Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
|
child: UploadContentContainer(
|
||||||
|
onChanged: (List<File>? files) {
|
||||||
|
onFileUpload(files);
|
||||||
|
resourceDTO.type = ResourceType.Video;
|
||||||
|
},
|
||||||
|
onChangedWeb: (List<PlatformFile>? files) {
|
||||||
|
onFileUploadWeb(files);
|
||||||
|
resourceDTO.type = ResourceType.Video;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Online Video
|
// Online Video
|
||||||
/*tabsToShow.add(
|
tabsToShow.add(
|
||||||
new Padding(
|
new Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
child: UploadOnlineResourceContainer(
|
child: UploadOnlineResourceContainer(
|
||||||
@ -151,6 +166,40 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// PDF
|
||||||
|
tabsToShow.add(
|
||||||
|
new Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
|
child: UploadContentContainer(
|
||||||
|
onChanged: (List<File>? files) {
|
||||||
|
onFileUpload(files);
|
||||||
|
resourceDTO.type = ResourceType.Pdf;
|
||||||
|
},
|
||||||
|
onChangedWeb: (List<PlatformFile>? files) {
|
||||||
|
onFileUploadWeb(files);
|
||||||
|
resourceDTO.type = ResourceType.Pdf;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// JSON
|
||||||
|
tabsToShow.add(
|
||||||
|
new Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
|
child: UploadContentContainer(
|
||||||
|
onChanged: (List<File>? files) {
|
||||||
|
onFileUpload(files);
|
||||||
|
resourceDTO.type = ResourceType.Json;
|
||||||
|
},
|
||||||
|
onChangedWeb: (List<PlatformFile>? files) {
|
||||||
|
onFileUploadWeb(files);
|
||||||
|
resourceDTO.type = ResourceType.Json;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
);*/
|
);*/
|
||||||
return tabsToShow;
|
return tabsToShow;
|
||||||
}
|
}
|
||||||
@ -4,20 +4,20 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class UploadImageContainer extends StatefulWidget {
|
class UploadContentContainer extends StatefulWidget {
|
||||||
final ValueChanged<List<File>?> onChanged;
|
final ValueChanged<List<File>?> onChanged;
|
||||||
final ValueChanged<List<PlatformFile>?> onChangedWeb;
|
final ValueChanged<List<PlatformFile>?> onChangedWeb;
|
||||||
const UploadImageContainer({
|
const UploadContentContainer({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
required this.onChangedWeb,
|
required this.onChangedWeb,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_UploadImageContainerState createState() => _UploadImageContainerState();
|
_UploadContentContainerState createState() => _UploadContentContainerState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _UploadImageContainerState extends State<UploadImageContainer> with SingleTickerProviderStateMixin {
|
class _UploadContentContainerState extends State<UploadContentContainer> with SingleTickerProviderStateMixin {
|
||||||
var filePath;
|
var filePath;
|
||||||
File? fileToShow;
|
File? fileToShow;
|
||||||
String? fileToShowWeb;
|
String? fileToShowWeb;
|
||||||
@ -48,7 +48,7 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
type: FileType.custom,
|
type: FileType.custom,
|
||||||
dialogTitle: 'Sélectionner un fichier',
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
allowMultiple: true,
|
allowMultiple: true,
|
||||||
allowedExtensions: ['jpg', 'jpeg', 'png'],
|
allowedExtensions: ['jpg', 'jpeg', 'png', 'mp3', 'mp4', 'pdf', 'json'],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -65,7 +65,7 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
type: FileType.custom,
|
type: FileType.custom,
|
||||||
dialogTitle: 'Sélectionner un fichier',
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
allowMultiple: true,
|
allowMultiple: true,
|
||||||
allowedExtensions: ['jpg', 'jpeg', 'png'],
|
allowedExtensions: ['jpg', 'jpeg', 'png', 'mp3', 'mp4', 'pdf', 'json'],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -139,6 +139,7 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
if(fileToShow != null) {
|
if(fileToShow != null) {
|
||||||
|
// depends on type..
|
||||||
return Image.file(
|
return Image.file(
|
||||||
fileToShow!,
|
fileToShow!,
|
||||||
height: 200,
|
height: 200,
|
||||||
|
|||||||
@ -105,12 +105,14 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: size.width *0.35, // TODO GET SIZE
|
width: size.width *0.35, // TODO GET SIZE
|
||||||
child: RoundedInputField(
|
child: RoundedInputField(
|
||||||
hintText: widget.resourceDTO.type == ResourceType.ImageUrl ? "Url de l'image" : "Url de la vidéo",
|
hintText: "Url de l'image ou de la vidéo",
|
||||||
icon: widget.resourceDTO.type == ResourceType.ImageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
//icon: widget.resourceDTO.type == ResourceType.ImageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
||||||
onChanged: (String text) {
|
onChanged: (String text) {
|
||||||
//print("onchanged url");
|
//print("onchanged url");
|
||||||
widget.resourceDTO.data = text;
|
widget.resourceDTO.url = text; // TODO check if ok
|
||||||
widget.onChanged(widget.resourceDTO);
|
widget.onChanged(widget.resourceDTO);
|
||||||
|
// TODO check type of resource
|
||||||
|
widget.resourceDTO.type = ResourceType.ImageUrl; // ou VideoUrl
|
||||||
},
|
},
|
||||||
initialValue: ""
|
initialValue: ""
|
||||||
),
|
),
|
||||||
@ -120,7 +122,7 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
//print("refresh preview");
|
//print("refresh preview");
|
||||||
setState(() {
|
setState(() {
|
||||||
urlResourceToShow = widget.resourceDTO.data;
|
urlResourceToShow = widget.resourceDTO.url;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
@ -134,7 +136,7 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if(widget.resourceDTO.data != null) showFile()
|
if(widget.resourceDTO.url != null) showFile()
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,10 +36,10 @@ class _ArticleConfigState extends State<ArticleConfig> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
articleDTO = ArticleDTO.fromJson(json.decode(widget.initialValue))!;
|
articleDTO = ArticleDTO.fromJson(json.decode(widget.initialValue))!;
|
||||||
List<ImageDTO> test = new List<ImageDTO>.from(articleDTO.images!);
|
List<ContentDTO> test = new List<ContentDTO>.from(articleDTO.contents!);
|
||||||
|
|
||||||
articleDTO.images = test;
|
articleDTO.contents = test;
|
||||||
articleDTO.images!.sort((a, b) => a.order!.compareTo(b.order!));
|
articleDTO.contents!.sort((a, b) => a.order!.compareTo(b.order!));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -53,11 +53,11 @@ class _ArticleConfigState extends State<ArticleConfig> {
|
|||||||
if (newIndex > oldIndex) {
|
if (newIndex > oldIndex) {
|
||||||
newIndex -= 1;
|
newIndex -= 1;
|
||||||
}
|
}
|
||||||
final ImageDTO item = articleDTO.images!.removeAt(oldIndex);
|
final ContentDTO item = articleDTO.contents!.removeAt(oldIndex);
|
||||||
articleDTO.images!.insert(newIndex, item);
|
articleDTO.contents!.insert(newIndex, item);
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
articleDTO.images!.forEach((image) {
|
articleDTO.contents!.forEach((image) {
|
||||||
image.order = i;
|
image.order = i;
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
@ -166,21 +166,21 @@ class _ArticleConfigState extends State<ArticleConfig> {
|
|||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
articleDTO.images!.length,
|
articleDTO.contents!.length,
|
||||||
(index) {
|
(index) {
|
||||||
return ListViewCardImage(
|
return ListViewCardContent(
|
||||||
articleDTO.images!,
|
articleDTO.contents!,
|
||||||
index,
|
index,
|
||||||
Key('$index'),
|
Key('$index'),
|
||||||
appContext,
|
appContext,
|
||||||
(images) {
|
(images) {
|
||||||
setState(() {
|
setState(() {
|
||||||
List<ImageDTO> test = new List<ImageDTO>.from(images);
|
List<ContentDTO> test = new List<ContentDTO>.from(images);
|
||||||
articleDTO.images = test;
|
articleDTO.contents = test;
|
||||||
List<ImageDTO> testToSend = new List<ImageDTO>.from(images);
|
List<ContentDTO> testToSend = new List<ContentDTO>.from(images);
|
||||||
testToSend = testToSend.where((element) => element.source_ != null).toList();
|
testToSend = testToSend.where((element) => element.resourceUrl != null).toList();
|
||||||
var articleToSend = new ArticleDTO();
|
var articleToSend = new ArticleDTO();
|
||||||
articleToSend.images = testToSend;
|
articleToSend.contents = testToSend;
|
||||||
articleToSend.audioIds = articleDTO.audioIds;
|
articleToSend.audioIds = articleDTO.audioIds;
|
||||||
articleToSend.isContentTop = articleDTO.isContentTop;
|
articleToSend.isContentTop = articleDTO.isContentTop;
|
||||||
articleToSend.content = articleDTO.content;
|
articleToSend.content = articleDTO.content;
|
||||||
@ -209,12 +209,12 @@ class _ArticleConfigState extends State<ArticleConfig> {
|
|||||||
right: 15,
|
right: 15,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var result = await showNewOrUpdateImageSlider(null, appContext, context, true, false);
|
var result = await showNewOrUpdateContentSlider(null, appContext, context, true, false);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
setState(() {
|
setState(() {
|
||||||
result.order = articleDTO.images!.length;
|
result.order = articleDTO.contents!.length;
|
||||||
articleDTO.images!.add(result);
|
articleDTO.contents!.add(result);
|
||||||
widget.onChanged(jsonEncode(articleDTO).toString());
|
widget.onChanged(jsonEncode(articleDTO).toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,26 +7,26 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class GeoPointImageList extends StatefulWidget {
|
class GeoPointContentList extends StatefulWidget {
|
||||||
final List<ImageGeoPoint> images;
|
final List<ContentGeoPoint> contents;
|
||||||
final ValueChanged<List<ImageGeoPoint>> onChanged;
|
final ValueChanged<List<ContentGeoPoint>> onChanged;
|
||||||
const GeoPointImageList({
|
const GeoPointContentList({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.images,
|
required this.contents,
|
||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_GeoPointImageListState createState() => _GeoPointImageListState();
|
_GeoPointContentListState createState() => _GeoPointContentListState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _GeoPointImageListState extends State<GeoPointImageList> {
|
class _GeoPointContentListState extends State<GeoPointContentList> {
|
||||||
late List<ImageGeoPoint> imagesGeo;
|
late List<ContentGeoPoint> contentsGeo;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
imagesGeo = new List<ImageGeoPoint>.from(widget.images);
|
contentsGeo = new List<ContentGeoPoint>.from(widget.contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onReorder(int oldIndex, int newIndex) {
|
void _onReorder(int oldIndex, int newIndex) {
|
||||||
@ -35,10 +35,10 @@ class _GeoPointImageListState extends State<GeoPointImageList> {
|
|||||||
if (newIndex > oldIndex) {
|
if (newIndex > oldIndex) {
|
||||||
newIndex -= 1;
|
newIndex -= 1;
|
||||||
}
|
}
|
||||||
final ImageGeoPoint item = imagesGeo.removeAt(oldIndex);
|
final ContentGeoPoint item = contentsGeo.removeAt(oldIndex);
|
||||||
imagesGeo.insert(newIndex, item);
|
contentsGeo.insert(newIndex, item);
|
||||||
|
|
||||||
widget.onChanged(imagesGeo);
|
widget.onChanged(contentsGeo);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -57,18 +57,18 @@ class _GeoPointImageListState extends State<GeoPointImageList> {
|
|||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
imagesGeo.length,
|
contentsGeo.length,
|
||||||
(index) {
|
(index) {
|
||||||
return ListViewCardGeoPointImages(
|
return ListViewCardGeoPointContents(
|
||||||
imagesGeo,
|
contentsGeo,
|
||||||
index,
|
index,
|
||||||
Key('$index'),
|
Key('$index'),
|
||||||
appContext,
|
appContext,
|
||||||
(imagesOutput) {
|
(imagesOutput) {
|
||||||
setState(() {
|
setState(() {
|
||||||
//List<ImageGeoPoint> test = new List<ImageGeoPoint>.from(imagesOutput);
|
//List<ImageGeoPoint> test = new List<ImageGeoPoint>.from(imagesOutput);
|
||||||
imagesGeo = imagesOutput;
|
contentsGeo = imagesOutput;
|
||||||
widget.onChanged(imagesGeo);
|
widget.onChanged(contentsGeo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -97,12 +97,12 @@ class _GeoPointImageListState extends State<GeoPointImageList> {
|
|||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ImageGeoPoint newImage = new ImageGeoPoint(imageResourceId: result.id, imageSource: result.type == ResourceType.ImageUrl ? result.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ result.id);
|
ContentGeoPoint newImage = new ContentGeoPoint(resourceId: result.id, resourceUrl: result.url);
|
||||||
//print("REULT IMAGES = ");
|
//print("REULT IMAGES = ");
|
||||||
//print(newImage);
|
//print(newImage);
|
||||||
imagesGeo.add(newImage);
|
contentsGeo.add(newImage);
|
||||||
//print(imagesGeo);
|
//print(imagesGeo);
|
||||||
widget.onChanged(imagesGeo);
|
widget.onChanged(contentsGeo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,15 +4,15 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ListViewCardGeoPointImages extends StatefulWidget {
|
class ListViewCardGeoPointContents extends StatefulWidget {
|
||||||
final int index;
|
final int index;
|
||||||
final Key key;
|
final Key key;
|
||||||
final List<ImageGeoPoint> listImages;
|
final List<ContentGeoPoint> listContents;
|
||||||
final AppContext appContext;
|
final AppContext appContext;
|
||||||
final ValueChanged<List<ImageGeoPoint>> onChanged;
|
final ValueChanged<List<ContentGeoPoint>> onChanged;
|
||||||
|
|
||||||
ListViewCardGeoPointImages(
|
ListViewCardGeoPointContents(
|
||||||
this.listImages,
|
this.listContents,
|
||||||
this.index,
|
this.index,
|
||||||
this.key,
|
this.key,
|
||||||
this.appContext,
|
this.appContext,
|
||||||
@ -20,10 +20,10 @@ class ListViewCardGeoPointImages extends StatefulWidget {
|
|||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ListViewCardGeoPointImagesState createState() => _ListViewCardGeoPointImagesState();
|
_ListViewCardGeoPointContentsState createState() => _ListViewCardGeoPointContentsState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ListViewCardGeoPointImagesState extends State<ListViewCardGeoPointImages> {
|
class _ListViewCardGeoPointContentsState extends State<ListViewCardGeoPointContents> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appContext = Provider.of<AppContext>(context);
|
final appContext = Provider.of<AppContext>(context);
|
||||||
@ -43,7 +43,7 @@ class _ListViewCardGeoPointImagesState extends State<ListViewCardGeoPointImages>
|
|||||||
),*/
|
),*/
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(right: 30.0),
|
padding: const EdgeInsets.only(right: 30.0),
|
||||||
child: getElement(widget.index, widget.listImages[widget.index], size, appContext)
|
child: getElement(widget.index, widget.listContents[widget.index], size, appContext)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -53,8 +53,8 @@ class _ListViewCardGeoPointImagesState extends State<ListViewCardGeoPointImages>
|
|||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.listImages.removeAt(widget.index);
|
widget.listContents.removeAt(widget.index);
|
||||||
widget.onChanged(widget.listImages);
|
widget.onChanged(widget.listContents);
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@ -74,15 +74,15 @@ class _ListViewCardGeoPointImagesState extends State<ListViewCardGeoPointImages>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getElement(int index, ImageGeoPoint imageGeoPoint, Size size, AppContext appContext) {
|
getElement(int index, ContentGeoPoint contentGeoPoint, Size size, AppContext appContext) {
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Image.network(
|
child: Image.network( // TODO support video etc
|
||||||
imageGeoPoint.imageSource!,
|
contentGeoPoint.resourceUrl!,
|
||||||
fit:BoxFit.scaleDown,
|
fit:BoxFit.scaleDown,
|
||||||
loadingBuilder: (BuildContext context, Widget child,
|
loadingBuilder: (BuildContext context, Widget child,
|
||||||
ImageChunkEvent? loadingProgress) {
|
ImageChunkEvent? loadingProgress) {
|
||||||
|
|||||||
@ -98,7 +98,7 @@ class _MapConfigState extends State<MapConfig> {
|
|||||||
mapDTO.iconResourceId = null;
|
mapDTO.iconResourceId = null;
|
||||||
} else {
|
} else {
|
||||||
mapDTO.iconResourceId = resource.id;
|
mapDTO.iconResourceId = resource.id;
|
||||||
mapDTO.iconSource = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
mapDTO.iconSource = resource.url;
|
||||||
}
|
}
|
||||||
widget.onChanged(jsonEncode(mapDTO).toString());
|
widget.onChanged(jsonEncode(mapDTO).toString());
|
||||||
},
|
},
|
||||||
|
|||||||
@ -18,7 +18,7 @@ void showNewOrUpdateGeoPoint(GeoPointDTO? inputGeoPointDTO, Function getResult,
|
|||||||
} else {
|
} else {
|
||||||
geoPointDTO.title = <TranslationDTO>[];
|
geoPointDTO.title = <TranslationDTO>[];
|
||||||
geoPointDTO.description = <TranslationDTO>[];
|
geoPointDTO.description = <TranslationDTO>[];
|
||||||
geoPointDTO.images = <ImageGeoPoint>[];
|
geoPointDTO.contents = <ContentGeoPoint>[];
|
||||||
|
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
|
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
|
||||||
@ -124,10 +124,10 @@ void showNewOrUpdateGeoPoint(GeoPointDTO? inputGeoPointDTO, Function getResult,
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: GeoPointImageList(
|
child: GeoPointContentList(
|
||||||
images: geoPointDTO.images!,
|
contents: geoPointDTO.contents!,
|
||||||
onChanged: (List<ImageGeoPoint> imagesOutput) {
|
onChanged: (List<ContentGeoPoint> contentsOutput) {
|
||||||
geoPointDTO.images = imagesOutput;
|
geoPointDTO.contents = contentsOutput;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -152,7 +152,7 @@ void showNewOrUpdateGeoPoint(GeoPointDTO? inputGeoPointDTO, Function getResult,
|
|||||||
color: kSecond,
|
color: kSecond,
|
||||||
press: () {
|
press: () {
|
||||||
if (inputGeoPointDTO != null) {
|
if (inputGeoPointDTO != null) {
|
||||||
geoPointDTO.images = inputGeoPointDTO.images;
|
geoPointDTO.contents = inputGeoPointDTO.contents;
|
||||||
}
|
}
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -53,7 +53,7 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext
|
|||||||
subSectionDTO.imageSource = null;
|
subSectionDTO.imageSource = null;
|
||||||
} else {
|
} else {
|
||||||
subSectionDTO.imageId = resource.id;
|
subSectionDTO.imageId = resource.id;
|
||||||
subSectionDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
subSectionDTO.imageSource = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSmall: true,
|
isSmall: true,
|
||||||
|
|||||||
@ -62,10 +62,10 @@ Future<QuestionDTO> showNewOrUpdateQuestionQuizz(QuestionDTO? inputQuestionDTO,
|
|||||||
onChanged: (ResourceDTO resource) {
|
onChanged: (ResourceDTO resource) {
|
||||||
if(resource.id == null) {
|
if(resource.id == null) {
|
||||||
questionDTO.resourceId = null;
|
questionDTO.resourceId = null;
|
||||||
questionDTO.source_ = null;
|
questionDTO.resourceUrl = null;
|
||||||
} else {
|
} else {
|
||||||
questionDTO.resourceId = resource.id;
|
questionDTO.resourceId = resource.id;
|
||||||
questionDTO.source_ = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
questionDTO.resourceUrl = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSmall: true
|
isSmall: true
|
||||||
|
|||||||
@ -51,10 +51,10 @@ Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext
|
|||||||
onChanged: (ResourceDTO resource) {
|
onChanged: (ResourceDTO resource) {
|
||||||
if(resource.id == null) {
|
if(resource.id == null) {
|
||||||
levelDTO.resourceId = null;
|
levelDTO.resourceId = null;
|
||||||
levelDTO.source_ = null;
|
levelDTO.resourceUrl = null;
|
||||||
} else {
|
} else {
|
||||||
levelDTO.resourceId = resource.id;
|
levelDTO.resourceId = resource.id;
|
||||||
levelDTO.source_ = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
levelDTO.resourceUrl = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSmall: true
|
isSmall: true
|
||||||
|
|||||||
@ -263,7 +263,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
|
|||||||
height: 75,
|
height: 75,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
if(question.source_ != null) Container(
|
if(question.resourceUrl != null) Container(
|
||||||
height: 60,
|
height: 60,
|
||||||
width: 60,
|
width: 60,
|
||||||
decoration: imageBoxDecoration(question, appContext),
|
decoration: imageBoxDecoration(question, appContext),
|
||||||
@ -366,10 +366,10 @@ imageBoxDecoration(QuestionDTO questionDTO, appContext) {
|
|||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
border: Border.all(width: 1.5, color: kSecond),
|
border: Border.all(width: 1.5, color: kSecond),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
image: questionDTO.source_ != null ? new DecorationImage(
|
image: questionDTO.resourceUrl != null ? new DecorationImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
image: new NetworkImage(
|
image: new NetworkImage(
|
||||||
questionDTO.source_!,
|
questionDTO.resourceUrl!,
|
||||||
),
|
),
|
||||||
) : null,
|
) : null,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -6,16 +6,16 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||||
|
|
||||||
class ListViewCardImage extends StatefulWidget {
|
class ListViewCardContent extends StatefulWidget {
|
||||||
final int index;
|
final int index;
|
||||||
final Key key;
|
final Key key;
|
||||||
final List<ImageDTO> listItems;
|
final List<ContentDTO> listItems;
|
||||||
final AppContext appContext;
|
final AppContext appContext;
|
||||||
final ValueChanged<List<ImageDTO>> onChanged;
|
final ValueChanged<List<ContentDTO>> onChanged;
|
||||||
final bool showTitleTranslations;
|
final bool showTitleTranslations;
|
||||||
final bool showDescriptionTranslations;
|
final bool showDescriptionTranslations;
|
||||||
|
|
||||||
ListViewCardImage(
|
ListViewCardContent(
|
||||||
this.listItems,
|
this.listItems,
|
||||||
this.index,
|
this.index,
|
||||||
this.key,
|
this.key,
|
||||||
@ -29,7 +29,7 @@ class ListViewCardImage extends StatefulWidget {
|
|||||||
_ListViewCard createState() => _ListViewCard();
|
_ListViewCard createState() => _ListViewCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ListViewCard extends State<ListViewCardImage> {
|
class _ListViewCard extends State<ListViewCardContent> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Card(
|
return Card(
|
||||||
@ -87,7 +87,7 @@ class _ListViewCard extends State<ListViewCardImage> {
|
|||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var result = await showNewOrUpdateImageSlider(
|
var result = await showNewOrUpdateContentSlider(
|
||||||
widget.listItems[widget.index],
|
widget.listItems[widget.index],
|
||||||
widget.appContext,
|
widget.appContext,
|
||||||
context,
|
context,
|
||||||
@ -134,16 +134,16 @@ class _ListViewCard extends State<ListViewCardImage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boxDecoration(ImageDTO imageDTO, appContext) {
|
boxDecoration(ContentDTO contentDTO, appContext) {
|
||||||
return BoxDecoration(
|
return BoxDecoration(
|
||||||
color: kBackgroundColor,
|
color: kBackgroundColor,
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
border: Border.all(width: 1.5, color: kSecond),
|
border: Border.all(width: 1.5, color: kSecond),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
image: imageDTO.title != null && imageDTO.source_ != null ? new DecorationImage(
|
image: contentDTO.title != null && contentDTO.resourceUrl != null ? new DecorationImage(
|
||||||
fit: BoxFit.scaleDown,
|
fit: BoxFit.scaleDown,
|
||||||
image: new NetworkImage(
|
image: new NetworkImage(
|
||||||
imageDTO.source_!,
|
contentDTO.resourceUrl!,
|
||||||
),
|
),
|
||||||
) : null,
|
) : null,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
|||||||
@ -9,14 +9,14 @@ import 'package:manager_app/app_context.dart';
|
|||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
|
|
||||||
Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext appContext, BuildContext context, bool showTitle, bool showDescription) async {
|
Future<ContentDTO> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, AppContext appContext, BuildContext context, bool showTitle, bool showDescription) async {
|
||||||
ImageDTO imageDTO = new ImageDTO();
|
ContentDTO contentDTO = new ContentDTO();
|
||||||
|
|
||||||
if (inputImageDTO != null) {
|
if (inputContentDTO != null) {
|
||||||
imageDTO = inputImageDTO;
|
contentDTO = inputContentDTO;
|
||||||
} else {
|
} else {
|
||||||
imageDTO.title = <TranslationDTO>[];
|
contentDTO.title = <TranslationDTO>[];
|
||||||
imageDTO.description = <TranslationDTO>[];
|
contentDTO.description = <TranslationDTO>[];
|
||||||
|
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
|
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
|
||||||
@ -28,8 +28,8 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext
|
|||||||
translationDescriptionDTO.language = element;
|
translationDescriptionDTO.language = element;
|
||||||
translationDescriptionDTO.value = "";
|
translationDescriptionDTO.value = "";
|
||||||
|
|
||||||
imageDTO.title!.add(translationTitleDTO);
|
contentDTO.title!.add(translationTitleDTO);
|
||||||
imageDTO.description!.add(translationDescriptionDTO);
|
contentDTO.description!.add(translationDescriptionDTO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,16 +53,16 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext
|
|||||||
Center(
|
Center(
|
||||||
child: ImageInputContainer(
|
child: ImageInputContainer(
|
||||||
label: "Image :",
|
label: "Image :",
|
||||||
initialValue: imageDTO.resourceId,
|
initialValue: contentDTO.resourceId,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
onChanged: (ResourceDTO resource) {
|
onChanged: (ResourceDTO resource) {
|
||||||
if(resource.id == null) {
|
if(resource.id == null) {
|
||||||
imageDTO.resourceId = null;
|
contentDTO.resourceId = null;
|
||||||
imageDTO.source_ = null;
|
contentDTO.resourceUrl = null;
|
||||||
} else {
|
} else {
|
||||||
imageDTO.resourceId = resource.id;
|
contentDTO.resourceId = resource.id;
|
||||||
imageDTO.source_ = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
contentDTO.resourceUrl = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSmall: true
|
isSmall: true
|
||||||
@ -81,10 +81,10 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
isHTML: true,
|
isHTML: true,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
initialValue: imageDTO.title != null ? imageDTO.title! : [],
|
initialValue: contentDTO.title != null ? contentDTO.title! : [],
|
||||||
onGetResult: (value) {
|
onGetResult: (value) {
|
||||||
if (imageDTO.title != value) {
|
if (contentDTO.title != value) {
|
||||||
imageDTO.title = value;
|
contentDTO.title = value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -96,10 +96,10 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
isHTML: true,
|
isHTML: true,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
initialValue: imageDTO.description != null ? imageDTO.description! : [],
|
initialValue: contentDTO.description != null ? contentDTO.description! : [],
|
||||||
onGetResult: (value) {
|
onGetResult: (value) {
|
||||||
if (imageDTO.description != value) {
|
if (contentDTO.description != value) {
|
||||||
imageDTO.description = value;
|
contentDTO.description = value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -137,16 +137,16 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO? inputImageDTO, AppContext
|
|||||||
Align(
|
Align(
|
||||||
alignment: AlignmentDirectional.bottomEnd,
|
alignment: AlignmentDirectional.bottomEnd,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: inputImageDTO != null ? 220: 150,
|
width: inputContentDTO != null ? 220: 150,
|
||||||
height: 70,
|
height: 70,
|
||||||
child: RoundedButton(
|
child: RoundedButton(
|
||||||
text: inputImageDTO != null ? "Sauvegarder" : "Créer",
|
text: inputContentDTO != null ? "Sauvegarder" : "Créer",
|
||||||
icon: Icons.check,
|
icon: Icons.check,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
textColor: kWhite,
|
textColor: kWhite,
|
||||||
press: () {
|
press: () {
|
||||||
if (imageDTO.resourceId != null) {
|
if (contentDTO.resourceId != null) {
|
||||||
Navigator.pop(dialogContext, imageDTO);
|
Navigator.pop(dialogContext, contentDTO);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
|||||||
@ -33,9 +33,9 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!;
|
sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!;
|
||||||
List<ImageDTO> test = new List<ImageDTO>.from(sliderDTO.images!);
|
List<ContentDTO> test = new List<ContentDTO>.from(sliderDTO.contents!);
|
||||||
sliderDTO.images = test;
|
sliderDTO.contents = test;
|
||||||
sliderDTO.images!.sort((a, b) => a.order!.compareTo(b.order!));
|
sliderDTO.contents!.sort((a, b) => a.order!.compareTo(b.order!));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -49,11 +49,11 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
if (newIndex > oldIndex) {
|
if (newIndex > oldIndex) {
|
||||||
newIndex -= 1;
|
newIndex -= 1;
|
||||||
}
|
}
|
||||||
final ImageDTO item = sliderDTO.images!.removeAt(oldIndex);
|
final ContentDTO item = sliderDTO.contents!.removeAt(oldIndex);
|
||||||
sliderDTO.images!.insert(newIndex, item);
|
sliderDTO.contents!.insert(newIndex, item);
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
sliderDTO.images!.forEach((image) {
|
sliderDTO.contents!.forEach((image) {
|
||||||
image.order = i;
|
image.order = i;
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
@ -72,21 +72,21 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
padding: const EdgeInsets.symmetric(vertical: 20.0),
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
sliderDTO.images!.length,
|
sliderDTO.contents!.length,
|
||||||
(index) {
|
(index) {
|
||||||
return ListViewCardImage(
|
return ListViewCardContent(
|
||||||
sliderDTO.images!,
|
sliderDTO.contents!,
|
||||||
index,
|
index,
|
||||||
Key('$index'),
|
Key('$index'),
|
||||||
appContext,
|
appContext,
|
||||||
(images) {
|
(images) {
|
||||||
setState(() {
|
setState(() {
|
||||||
List<ImageDTO> test = new List<ImageDTO>.from(images);
|
List<ContentDTO> test = new List<ContentDTO>.from(images);
|
||||||
sliderDTO.images = test;
|
sliderDTO.contents = test;
|
||||||
List<ImageDTO> testToSend = new List<ImageDTO>.from(images);
|
List<ContentDTO> testToSend = new List<ContentDTO>.from(images);
|
||||||
testToSend = testToSend.where((element) => element.source_ != null).toList();
|
testToSend = testToSend.where((element) => element.resourceUrl != null).toList();
|
||||||
var sliderToSend = new SliderDTO();
|
var sliderToSend = new SliderDTO();
|
||||||
sliderToSend.images = testToSend;
|
sliderToSend.contents = testToSend;
|
||||||
widget.onChanged(jsonEncode(sliderToSend).toString());
|
widget.onChanged(jsonEncode(sliderToSend).toString());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -102,12 +102,12 @@ class _SliderConfigState extends State<SliderConfig> {
|
|||||||
right: 0,
|
right: 0,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var result = await showNewOrUpdateImageSlider(null, appContext, context, true, true);
|
var result = await showNewOrUpdateContentSlider(null, appContext, context, true, true);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
setState(() {
|
setState(() {
|
||||||
result.order = sliderDTO.images!.length;
|
result.order = sliderDTO.contents!.length;
|
||||||
sliderDTO.images!.add(result);
|
sliderDTO.contents!.add(result);
|
||||||
widget.onChanged(jsonEncode(sliderDTO).toString());
|
widget.onChanged(jsonEncode(sliderDTO).toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -277,7 +277,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
sectionDTO.imageSource = null;
|
sectionDTO.imageSource = null;
|
||||||
} else {
|
} else {
|
||||||
sectionDTO!.imageId = resource.id;
|
sectionDTO!.imageId = resource.id;
|
||||||
sectionDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
sectionDTO.imageSource = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -292,7 +292,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
configurationDTO.imageSource = null;
|
configurationDTO.imageSource = null;
|
||||||
} else {
|
} else {
|
||||||
configurationDTO.imageId = resource.id;
|
configurationDTO.imageId = resource.id;
|
||||||
configurationDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resource.id!;
|
configurationDTO.imageSource = resource.url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class _BodyState extends State<Body> {
|
|||||||
late MenuSection configurations;
|
late MenuSection configurations;
|
||||||
late MenuSection resources;
|
late MenuSection resources;
|
||||||
|
|
||||||
Menu menu = new Menu(title: "MyMuseum");
|
Menu menu = new Menu(title: "MyInfoMate");
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -217,7 +217,11 @@ class _BodyState extends State<Body> {
|
|||||||
resourceTypes: [
|
resourceTypes: [
|
||||||
ResourceType.Audio,
|
ResourceType.Audio,
|
||||||
ResourceType.Image,
|
ResourceType.Image,
|
||||||
ResourceType.ImageUrl
|
ResourceType.ImageUrl,
|
||||||
|
ResourceType.Video,
|
||||||
|
ResourceType.VideoUrl,
|
||||||
|
ResourceType.Pdf,
|
||||||
|
ResourceType.Json
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class _MainScreenState extends State<MainScreen> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text("MyMuseum", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)),
|
appBar: AppBar(title: Text("MyInfoMate", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)),
|
||||||
drawer: Drawer(
|
drawer: Drawer(
|
||||||
child: getMenu()
|
child: getMenu()
|
||||||
),
|
),
|
||||||
@ -46,7 +46,7 @@ class _MainScreenState extends State<MainScreen> {
|
|||||||
MenuSection configurations = new MenuSection(name: "Configurations", type: "configurations", order: 1); // TODO Visites pour Fort St Héribert
|
MenuSection configurations = new MenuSection(name: "Configurations", type: "configurations", order: 1); // TODO Visites pour Fort St Héribert
|
||||||
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 2);
|
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 2);
|
||||||
|
|
||||||
Menu menu = new Menu(title: "MyMuseum");
|
Menu menu = new Menu(title: "MyInfoMate");
|
||||||
|
|
||||||
return ListView(
|
return ListView(
|
||||||
// Important: Remove any padding from the ListView.
|
// Important: Remove any padding from the ListView.
|
||||||
|
|||||||
@ -42,7 +42,7 @@ dynamic showNewResource(AppContext appContext, BuildContext context) async {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: size.width *0.5,
|
width: size.width *0.85,
|
||||||
height: size.height *0.5,
|
height: size.height *0.5,
|
||||||
child: ResourceTab(
|
child: ResourceTab(
|
||||||
resourceDTO: resourceDetailDTO,
|
resourceDTO: resourceDetailDTO,
|
||||||
@ -91,13 +91,13 @@ dynamic showNewResource(AppContext appContext, BuildContext context) async {
|
|||||||
press: () {
|
press: () {
|
||||||
if (resourceDetailDTO.label != null && resourceDetailDTO.label!.trim() != '') {
|
if (resourceDetailDTO.label != null && resourceDetailDTO.label!.trim() != '') {
|
||||||
if(kIsWeb) {
|
if(kIsWeb) {
|
||||||
if(resourceDetailDTO.data != null || filesToSendWeb != null) {
|
if(resourceDetailDTO.url != null || filesToSendWeb != null) { // TODO clarify resourceDetailDTO.data != null
|
||||||
Navigator.pop(context, [resourceDetailDTO, filesToSend, filesToSendWeb]);
|
Navigator.pop(context, [resourceDetailDTO, filesToSend, filesToSendWeb]);
|
||||||
} else {
|
} else {
|
||||||
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (resourceDetailDTO.data != null || filesToSendWeb!.length > 0 || filesToSend!.length > 0) {
|
if (resourceDetailDTO.url != null || filesToSendWeb!.length > 0 || filesToSend!.length > 0) { // TODO clarify resourceDetailDTO.data != null
|
||||||
Navigator.pop(context, [resourceDetailDTO, filesToSend, filesToSendWeb]);
|
Navigator.pop(context, [resourceDetailDTO, filesToSend, filesToSendWeb]);
|
||||||
} else {
|
} else {
|
||||||
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
||||||
|
|||||||
@ -190,16 +190,18 @@ class _ResourceBodyGridState extends State<ResourceBodyGrid> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boxDecoration(dynamic resourceDetailDTO, appContext) {
|
boxDecoration(ResourceDTO resourceDetailDTO, appContext) {
|
||||||
|
print("boxDecorationboxDecorationboxDecorationboxDecoration");
|
||||||
|
print(resourceDetailDTO);
|
||||||
return BoxDecoration(
|
return BoxDecoration(
|
||||||
color: resourceDetailDTO.id == null ? kSecond : kBackgroundColor,
|
color: resourceDetailDTO.id == null ? kSecond : kBackgroundColor,
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
borderRadius: BorderRadius.circular(30.0),
|
borderRadius: BorderRadius.circular(30.0),
|
||||||
image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.Image || resourceDetailDTO.data != null && resourceDetailDTO.type == ResourceType.ImageUrl)? new DecorationImage(
|
image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.Image || resourceDetailDTO.url != null && resourceDetailDTO.type == ResourceType.ImageUrl)? new DecorationImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop),
|
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop),
|
||||||
image: new NetworkImage(
|
image: new NetworkImage(
|
||||||
resourceDetailDTO.type == ResourceType.Image ? (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.apiClient.basePath+"/api/Resource/"+ resourceDetailDTO.id : resourceDetailDTO.data,
|
resourceDetailDTO.url!,
|
||||||
),
|
),
|
||||||
) : null,
|
) : null,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
|||||||
@ -121,8 +121,72 @@ Future<List<ResourceDTO>?> getResources(Function? onGetResult, bool isImage, App
|
|||||||
return resources;
|
return resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<PlatformFile>? filesWeb, AppContext appContext, context) async {
|
Future<List<ResourceDTO?>?> create(ResourceDTO resourceDTO, List<File>? files, List<PlatformFile>? filesWeb, AppContext appContext, context) async {
|
||||||
switch(resourceDTO.type) {
|
List<ResourceDTO?> createdResources = [];
|
||||||
|
print("Coucou create");
|
||||||
|
print(resourceDTO);
|
||||||
|
|
||||||
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
|
int index = 0;
|
||||||
|
// TODO handle online resource
|
||||||
|
for (PlatformFile platformFile in filesWeb!) {
|
||||||
|
print("Coucou platformFile");
|
||||||
|
print(platformFile);
|
||||||
|
print(platformFile.name);
|
||||||
|
print(platformFile.extension);
|
||||||
|
ResourceDTO resourceDTO = new ResourceDTO(label: platformFile.name);
|
||||||
|
switch(platformFile.extension) {
|
||||||
|
case 'jpg':
|
||||||
|
case 'jpeg':
|
||||||
|
case 'png':
|
||||||
|
resourceDTO.type = ResourceType.Image;
|
||||||
|
break;
|
||||||
|
case 'mp3':
|
||||||
|
resourceDTO.type = ResourceType.Audio;
|
||||||
|
break;
|
||||||
|
case 'mp4':
|
||||||
|
resourceDTO.type = ResourceType.Video;
|
||||||
|
break;
|
||||||
|
case 'pdf':
|
||||||
|
resourceDTO.type = ResourceType.Pdf;
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
resourceDTO.type = ResourceType.Json;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
resourceDTO.instanceId = managerAppContext.instanceId;
|
||||||
|
try {
|
||||||
|
print("Trying to create resource");
|
||||||
|
resourceDTO.dateCreation = DateTime.now();
|
||||||
|
ResourceDTO? newResource = await managerAppContext.clientAPI!.resourceApi!.resourceCreate(resourceDTO);
|
||||||
|
print("created resource");
|
||||||
|
print(newResource);
|
||||||
|
if(newResource != null && resourceDTO.type != null) {
|
||||||
|
FirebaseStorage storage = FirebaseStorage.instance;
|
||||||
|
Reference ref = storage.ref().child('pictures/${appContext.getContext().instanceId}/${Path.basename(newResource.id!.toString())}.${platformFile.extension}');
|
||||||
|
|
||||||
|
UploadTask uploadTask = ref.putData(platformFile.bytes!);
|
||||||
|
uploadTask.then((res) {
|
||||||
|
res.ref.getDownloadURL().then((urlImage) {
|
||||||
|
showNotification(Colors.green, kWhite, 'La ressource a été créée avec succès', context, null);
|
||||||
|
newResource.url = urlImage;
|
||||||
|
(appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.resourceUpdate(newResource);
|
||||||
|
createdResources.add(newResource);
|
||||||
|
index++;
|
||||||
|
if(index == filesWeb.length) {
|
||||||
|
return createdResources;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
print("ERROR creating resource");
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
|
/*switch(resourceDTO.type) {
|
||||||
case ResourceType.Audio:
|
case ResourceType.Audio:
|
||||||
case ResourceType.Image:
|
case ResourceType.Image:
|
||||||
case ResourceType.Video:
|
case ResourceType.Video:
|
||||||
@ -162,8 +226,6 @@ Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<Pla
|
|||||||
await res.stream.bytesToString();
|
await res.stream.bytesToString();
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
|
|
||||||
|
|
||||||
// TODO just create resource ref with download url from followed
|
// TODO just create resource ref with download url from followed
|
||||||
try {
|
try {
|
||||||
for (PlatformFile platformFile in filesWeb!) {
|
for (PlatformFile platformFile in filesWeb!) {
|
||||||
@ -178,7 +240,7 @@ Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<Pla
|
|||||||
uploadTask.then((res) {
|
uploadTask.then((res) {
|
||||||
res.ref.getDownloadURL().then((urlImage) {
|
res.ref.getDownloadURL().then((urlImage) {
|
||||||
showNotification(Colors.green, kWhite, 'La ressource a été créée avec succès', context, null);
|
showNotification(Colors.green, kWhite, 'La ressource a été créée avec succès', context, null);
|
||||||
newResource.data = urlImage;
|
newResource.url = urlImage;
|
||||||
(appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.resourceUpdate(newResource);
|
(appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.resourceUpdate(newResource);
|
||||||
return newResource;
|
return newResource;
|
||||||
});
|
});
|
||||||
@ -186,13 +248,10 @@ Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<Pla
|
|||||||
}
|
}
|
||||||
showNotification(Colors.orange, kWhite, 'Une erreur est survenue lors de la création de la ressource', context, null);
|
showNotification(Colors.orange, kWhite, 'Une erreur est survenue lors de la création de la ressource', context, null);
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error uploading file: $e');
|
print('Error uploading file: $e');
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
showNotification(kPrimaryColor, kWhite, 'Erreur, attention, la taille de la ressource doit être inférieure à 1.5Mb', context, null);
|
showNotification(kPrimaryColor, kWhite, 'Erreur, attention, la taille de la ressource doit être inférieure à 1.5Mb', context, null);
|
||||||
@ -200,9 +259,9 @@ Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<Pla
|
|||||||
break;
|
break;
|
||||||
case ResourceType.ImageUrl:
|
case ResourceType.ImageUrl:
|
||||||
case ResourceType.VideoUrl:
|
case ResourceType.VideoUrl:
|
||||||
if (resourceDTO.data != null) {
|
if (resourceDTO.url != null) {
|
||||||
// test if Correct url
|
// test if Correct url
|
||||||
bool _validURL = Uri.parse(resourceDTO.data!).isAbsolute;
|
bool _validURL = Uri.parse(resourceDTO.url!).isAbsolute;
|
||||||
if(_validURL) {
|
if(_validURL) {
|
||||||
resourceDTO.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
|
resourceDTO.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
|
||||||
ResourceDTO? newResource = await (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.resourceCreate(resourceDTO);
|
ResourceDTO? newResource = await (appContext.getContext() as ManagerAppContext).clientAPI!.resourceApi!.resourceCreate(resourceDTO);
|
||||||
@ -216,5 +275,5 @@ Future<ResourceDTO?> create(ResourceDTO resourceDTO, List<File>? files, List<Pla
|
|||||||
showNotification(Colors.orange, kWhite, 'Veuillez remplir le champ URL', context, null);
|
showNotification(Colors.orange, kWhite, 'Veuillez remplir le champ URL', context, null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
@ -31,11 +31,11 @@ class LoginScreen extends StatefulWidget {
|
|||||||
class _LoginScreenState extends State<LoginScreen> {
|
class _LoginScreenState extends State<LoginScreen> {
|
||||||
String email = ""; // DEV "test@email.be"
|
String email = ""; // DEV "test@email.be"
|
||||||
String password = ""; // DEV = "kljqsdkljqsd"
|
String password = ""; // DEV = "kljqsdkljqsd"
|
||||||
String? host = "https://api.mymuseum.be"; // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
|
String? host = "http://localhost:5000"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
|
||||||
Client? clientAPI;
|
Client? clientAPI;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
bool isRememberMe = false;
|
bool isRememberMe = false;
|
||||||
String pageTitle = "MyMuseum";
|
String pageTitle = "MyInfoMate";
|
||||||
String? token;
|
String? token;
|
||||||
String? instanceId;
|
String? instanceId;
|
||||||
int? pinCode;
|
int? pinCode;
|
||||||
@ -174,7 +174,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
//this.isRememberMe = widget.session.rememberMe;
|
//this.isRememberMe = widget.session.rememberMe;
|
||||||
this.host = "https://api.mymuseum.be"; // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
|
this.host = "http://localhost:5000"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
|
||||||
//this.email = "test@email.be"; //widget.session.email;
|
//this.email = "test@email.be"; //widget.session.email;
|
||||||
//this.password = "kljqsdkljqsd"; //widget.session.password;
|
//this.password = "kljqsdkljqsd"; //widget.session.password;
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
var subdomain = urlParts[0].replaceAll('https://', '');
|
var subdomain = urlParts[0].replaceAll('https://', '');
|
||||||
switch(subdomain) {
|
switch(subdomain) {
|
||||||
case "manager":
|
case "manager":
|
||||||
this.pageTitle = "MyMuseum";
|
this.pageTitle = "MyInfoMate";
|
||||||
break;
|
break;
|
||||||
case "fortsaintheribert":
|
case "fortsaintheribert":
|
||||||
this.pageTitle = "Fort de Saint Héribert";
|
this.pageTitle = "Fort de Saint Héribert";
|
||||||
|
|||||||
@ -5,7 +5,7 @@ info:
|
|||||||
description: API Manager Service
|
description: API Manager Service
|
||||||
version: Version Alpha
|
version: Version Alpha
|
||||||
servers:
|
servers:
|
||||||
- url: https://api.mymuseum.be
|
- url: http://localhost:5000
|
||||||
paths:
|
paths:
|
||||||
/api/Configuration:
|
/api/Configuration:
|
||||||
get:
|
get:
|
||||||
@ -1463,6 +1463,48 @@ paths:
|
|||||||
$ref: '#/components/schemas/ArticleDTO'
|
$ref: '#/components/schemas/ArticleDTO'
|
||||||
security:
|
security:
|
||||||
- bearer: []
|
- bearer: []
|
||||||
|
/api/Section/PdfDTO:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Section
|
||||||
|
operationId: Section_GetPdfDTO
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ''
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PdfDTO'
|
||||||
|
security:
|
||||||
|
- bearer: []
|
||||||
|
/api/Section/PuzzleDTO:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Section
|
||||||
|
operationId: Section_GetPuzzleDTO
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ''
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PuzzleDTO'
|
||||||
|
security:
|
||||||
|
- bearer: []
|
||||||
|
/api/Section/AgendaDTO:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Section
|
||||||
|
operationId: Section_GetAgendaDTO
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ''
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AgendaDTO'
|
||||||
|
security:
|
||||||
|
- bearer: []
|
||||||
/api/User:
|
/api/User:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -1866,6 +1908,9 @@ components:
|
|||||||
4 = Menu
|
4 = Menu
|
||||||
5 = Quizz
|
5 = Quizz
|
||||||
6 = Article
|
6 = Article
|
||||||
|
7 = PDF
|
||||||
|
8 = Puzzle
|
||||||
|
9 = Agenda
|
||||||
x-enumNames:
|
x-enumNames:
|
||||||
- Map
|
- Map
|
||||||
- Slider
|
- Slider
|
||||||
@ -1874,6 +1919,9 @@ components:
|
|||||||
- Menu
|
- Menu
|
||||||
- Quizz
|
- Quizz
|
||||||
- Article
|
- Article
|
||||||
|
- PDF
|
||||||
|
- Puzzle
|
||||||
|
- Agenda
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
@ -1882,6 +1930,9 @@ components:
|
|||||||
- 4
|
- 4
|
||||||
- 5
|
- 5
|
||||||
- 6
|
- 6
|
||||||
|
- 7
|
||||||
|
- 8
|
||||||
|
- 9
|
||||||
ResourceDTO:
|
ResourceDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -1894,7 +1945,7 @@ components:
|
|||||||
label:
|
label:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
data:
|
url:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
dateCreation:
|
dateCreation:
|
||||||
@ -1911,18 +1962,24 @@ components:
|
|||||||
2 = ImageUrl
|
2 = ImageUrl
|
||||||
3 = VideoUrl
|
3 = VideoUrl
|
||||||
4 = Audio
|
4 = Audio
|
||||||
|
5 = PDF
|
||||||
|
6 = JSON
|
||||||
x-enumNames:
|
x-enumNames:
|
||||||
- Image
|
- Image
|
||||||
- Video
|
- Video
|
||||||
- ImageUrl
|
- ImageUrl
|
||||||
- VideoUrl
|
- VideoUrl
|
||||||
- Audio
|
- Audio
|
||||||
|
- PDF
|
||||||
|
- JSON
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
- 2
|
- 2
|
||||||
- 3
|
- 3
|
||||||
- 4
|
- 4
|
||||||
|
- 5
|
||||||
|
- 6
|
||||||
DeviceDTO:
|
DeviceDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2031,6 +2088,11 @@ components:
|
|||||||
iconSource:
|
iconSource:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
categories:
|
||||||
|
type: array
|
||||||
|
nullable: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/CategorieDTO'
|
||||||
MapTypeApp:
|
MapTypeApp:
|
||||||
type: integer
|
type: integer
|
||||||
description: |-
|
description: |-
|
||||||
@ -2068,37 +2130,56 @@ components:
|
|||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
images:
|
contents:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ImageGeoPoint'
|
$ref: '#/components/schemas/ContentGeoPoint'
|
||||||
|
categorie:
|
||||||
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/CategorieDTO'
|
||||||
latitude:
|
latitude:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
longitude:
|
longitude:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
ImageGeoPoint:
|
ContentGeoPoint:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
imageResourceId:
|
resourceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
imageSource:
|
resourceType:
|
||||||
|
$ref: '#/components/schemas/ResourceType'
|
||||||
|
resourceUrl:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
latitude:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
CategorieDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
icon:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
SliderDTO:
|
SliderDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
images:
|
contents:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ImageDTO'
|
$ref: '#/components/schemas/ContentDTO'
|
||||||
ImageDTO:
|
ContentDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
@ -2115,12 +2196,14 @@ components:
|
|||||||
resourceId:
|
resourceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
source:
|
resourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
order:
|
order:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
resourceType:
|
||||||
|
$ref: '#/components/schemas/ResourceType'
|
||||||
VideoDTO:
|
VideoDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2194,7 +2277,9 @@ components:
|
|||||||
resourceId:
|
resourceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
source:
|
resourceType:
|
||||||
|
$ref: '#/components/schemas/ResourceType'
|
||||||
|
resourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
order:
|
order:
|
||||||
@ -2226,7 +2311,9 @@ components:
|
|||||||
resourceId:
|
resourceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
source:
|
resourceType:
|
||||||
|
$ref: '#/components/schemas/ResourceType'
|
||||||
|
resourceUrl:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
ArticleDTO:
|
ArticleDTO:
|
||||||
@ -2247,11 +2334,49 @@ components:
|
|||||||
$ref: '#/components/schemas/TranslationDTO'
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
isReadAudioAuto:
|
isReadAudioAuto:
|
||||||
type: boolean
|
type: boolean
|
||||||
images:
|
contents:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ImageDTO'
|
$ref: '#/components/schemas/ContentDTO'
|
||||||
|
PdfDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
resourceId:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
resourceUrl:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
PuzzleDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
messageDebut:
|
||||||
|
type: array
|
||||||
|
nullable: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
|
messageFin:
|
||||||
|
type: array
|
||||||
|
nullable: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/TranslationDTO'
|
||||||
|
image:
|
||||||
|
nullable: true
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/ContentDTO'
|
||||||
|
AgendaDTO:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
resourceId:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
resourceUrl:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
User:
|
User:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|||||||
@ -20,9 +20,13 @@ const List<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Qu
|
|||||||
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
||||||
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
|
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL", "AR", "UK"];
|
||||||
List<ResourceTypeModel> resource_types = [
|
List<ResourceTypeModel> resource_types = [
|
||||||
ResourceTypeModel(label: "image", type: ResourceType.Image),
|
ResourceTypeModel(label: "Image", type: ResourceType.Image),
|
||||||
ResourceTypeModel(label: "image url", type: ResourceType.ImageUrl),
|
ResourceTypeModel(label: "Image url", type: ResourceType.ImageUrl),
|
||||||
ResourceTypeModel(label: "audio", type: ResourceType.Audio)
|
ResourceTypeModel(label: "Vidéo", type: ResourceType.Video),
|
||||||
|
ResourceTypeModel(label: "Vidéo url", type: ResourceType.VideoUrl),
|
||||||
|
ResourceTypeModel(label: "Audio", type: ResourceType.Audio),
|
||||||
|
ResourceTypeModel(label: "PDF", type: ResourceType.Pdf),
|
||||||
|
ResourceTypeModel(label: "JSON", type: ResourceType.Json)
|
||||||
]; // "video url" , "video", {"label": "image"}, "image url", "audio"
|
]; // "video url" , "video", {"label": "image"}, "image url", "audio"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -2,10 +2,14 @@
|
|||||||
.travis.yml
|
.travis.yml
|
||||||
README.md
|
README.md
|
||||||
analysis_options.yaml
|
analysis_options.yaml
|
||||||
|
doc/AgendaDTO.md
|
||||||
doc/ArticleDTO.md
|
doc/ArticleDTO.md
|
||||||
doc/AuthenticationApi.md
|
doc/AuthenticationApi.md
|
||||||
|
doc/CategorieDTO.md
|
||||||
doc/ConfigurationApi.md
|
doc/ConfigurationApi.md
|
||||||
doc/ConfigurationDTO.md
|
doc/ConfigurationDTO.md
|
||||||
|
doc/ContentDTO.md
|
||||||
|
doc/ContentGeoPoint.md
|
||||||
doc/DeviceApi.md
|
doc/DeviceApi.md
|
||||||
doc/DeviceDTO.md
|
doc/DeviceDTO.md
|
||||||
doc/DeviceDetailDTO.md
|
doc/DeviceDetailDTO.md
|
||||||
@ -13,8 +17,7 @@ doc/DeviceDetailDTOAllOf.md
|
|||||||
doc/ExportConfigurationDTO.md
|
doc/ExportConfigurationDTO.md
|
||||||
doc/ExportConfigurationDTOAllOf.md
|
doc/ExportConfigurationDTOAllOf.md
|
||||||
doc/GeoPointDTO.md
|
doc/GeoPointDTO.md
|
||||||
doc/ImageDTO.md
|
doc/GeoPointDTOCategorie.md
|
||||||
doc/ImageGeoPoint.md
|
|
||||||
doc/Instance.md
|
doc/Instance.md
|
||||||
doc/InstanceApi.md
|
doc/InstanceApi.md
|
||||||
doc/InstanceDTO.md
|
doc/InstanceDTO.md
|
||||||
@ -23,7 +26,10 @@ doc/LoginDTO.md
|
|||||||
doc/MapDTO.md
|
doc/MapDTO.md
|
||||||
doc/MapTypeApp.md
|
doc/MapTypeApp.md
|
||||||
doc/MenuDTO.md
|
doc/MenuDTO.md
|
||||||
|
doc/PdfDTO.md
|
||||||
doc/PlayerMessageDTO.md
|
doc/PlayerMessageDTO.md
|
||||||
|
doc/PuzzleDTO.md
|
||||||
|
doc/PuzzleDTOImage.md
|
||||||
doc/QuestionDTO.md
|
doc/QuestionDTO.md
|
||||||
doc/QuizzDTO.md
|
doc/QuizzDTO.md
|
||||||
doc/QuizzDTOBadLevel.md
|
doc/QuizzDTOBadLevel.md
|
||||||
@ -59,16 +65,19 @@ lib/auth/authentication.dart
|
|||||||
lib/auth/http_basic_auth.dart
|
lib/auth/http_basic_auth.dart
|
||||||
lib/auth/http_bearer_auth.dart
|
lib/auth/http_bearer_auth.dart
|
||||||
lib/auth/oauth.dart
|
lib/auth/oauth.dart
|
||||||
|
lib/model/agenda_dto.dart
|
||||||
lib/model/article_dto.dart
|
lib/model/article_dto.dart
|
||||||
|
lib/model/categorie_dto.dart
|
||||||
lib/model/configuration_dto.dart
|
lib/model/configuration_dto.dart
|
||||||
|
lib/model/content_dto.dart
|
||||||
|
lib/model/content_geo_point.dart
|
||||||
lib/model/device_detail_dto.dart
|
lib/model/device_detail_dto.dart
|
||||||
lib/model/device_detail_dto_all_of.dart
|
lib/model/device_detail_dto_all_of.dart
|
||||||
lib/model/device_dto.dart
|
lib/model/device_dto.dart
|
||||||
lib/model/export_configuration_dto.dart
|
lib/model/export_configuration_dto.dart
|
||||||
lib/model/export_configuration_dto_all_of.dart
|
lib/model/export_configuration_dto_all_of.dart
|
||||||
lib/model/geo_point_dto.dart
|
lib/model/geo_point_dto.dart
|
||||||
lib/model/image_dto.dart
|
lib/model/geo_point_dto_categorie.dart
|
||||||
lib/model/image_geo_point.dart
|
|
||||||
lib/model/instance.dart
|
lib/model/instance.dart
|
||||||
lib/model/instance_dto.dart
|
lib/model/instance_dto.dart
|
||||||
lib/model/level_dto.dart
|
lib/model/level_dto.dart
|
||||||
@ -76,7 +85,10 @@ lib/model/login_dto.dart
|
|||||||
lib/model/map_dto.dart
|
lib/model/map_dto.dart
|
||||||
lib/model/map_type_app.dart
|
lib/model/map_type_app.dart
|
||||||
lib/model/menu_dto.dart
|
lib/model/menu_dto.dart
|
||||||
|
lib/model/pdf_dto.dart
|
||||||
lib/model/player_message_dto.dart
|
lib/model/player_message_dto.dart
|
||||||
|
lib/model/puzzle_dto.dart
|
||||||
|
lib/model/puzzle_dto_image.dart
|
||||||
lib/model/question_dto.dart
|
lib/model/question_dto.dart
|
||||||
lib/model/quizz_dto.dart
|
lib/model/quizz_dto.dart
|
||||||
lib/model/quizz_dto_bad_level.dart
|
lib/model/quizz_dto_bad_level.dart
|
||||||
|
|||||||
@ -60,7 +60,7 @@ try {
|
|||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
@ -97,6 +97,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||||
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||||
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
||||||
|
*SectionApi* | [**sectionGetAgendaDTO**](doc\/SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO |
|
||||||
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
||||||
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||||
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||||
@ -104,6 +105,8 @@ Class | Method | HTTP request | Description
|
|||||||
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||||
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
||||||
*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
||||||
|
*SectionApi* | [**sectionGetPdfDTO**](doc\/SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO |
|
||||||
|
*SectionApi* | [**sectionGetPuzzleDTO**](doc\/SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO |
|
||||||
*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
||||||
*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
||||||
*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
||||||
@ -120,16 +123,19 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
|
||||||
|
- [AgendaDTO](doc\/AgendaDTO.md)
|
||||||
- [ArticleDTO](doc\/ArticleDTO.md)
|
- [ArticleDTO](doc\/ArticleDTO.md)
|
||||||
|
- [CategorieDTO](doc\/CategorieDTO.md)
|
||||||
- [ConfigurationDTO](doc\/ConfigurationDTO.md)
|
- [ConfigurationDTO](doc\/ConfigurationDTO.md)
|
||||||
|
- [ContentDTO](doc\/ContentDTO.md)
|
||||||
|
- [ContentGeoPoint](doc\/ContentGeoPoint.md)
|
||||||
- [DeviceDTO](doc\/DeviceDTO.md)
|
- [DeviceDTO](doc\/DeviceDTO.md)
|
||||||
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
|
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
|
||||||
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
|
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
|
||||||
- [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md)
|
- [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md)
|
||||||
- [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md)
|
- [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md)
|
||||||
- [GeoPointDTO](doc\/GeoPointDTO.md)
|
- [GeoPointDTO](doc\/GeoPointDTO.md)
|
||||||
- [ImageDTO](doc\/ImageDTO.md)
|
- [GeoPointDTOCategorie](doc\/GeoPointDTOCategorie.md)
|
||||||
- [ImageGeoPoint](doc\/ImageGeoPoint.md)
|
|
||||||
- [Instance](doc\/Instance.md)
|
- [Instance](doc\/Instance.md)
|
||||||
- [InstanceDTO](doc\/InstanceDTO.md)
|
- [InstanceDTO](doc\/InstanceDTO.md)
|
||||||
- [LevelDTO](doc\/LevelDTO.md)
|
- [LevelDTO](doc\/LevelDTO.md)
|
||||||
@ -137,7 +143,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [MapDTO](doc\/MapDTO.md)
|
- [MapDTO](doc\/MapDTO.md)
|
||||||
- [MapTypeApp](doc\/MapTypeApp.md)
|
- [MapTypeApp](doc\/MapTypeApp.md)
|
||||||
- [MenuDTO](doc\/MenuDTO.md)
|
- [MenuDTO](doc\/MenuDTO.md)
|
||||||
|
- [PdfDTO](doc\/PdfDTO.md)
|
||||||
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
|
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
|
||||||
|
- [PuzzleDTO](doc\/PuzzleDTO.md)
|
||||||
|
- [PuzzleDTOImage](doc\/PuzzleDTOImage.md)
|
||||||
- [QuestionDTO](doc\/QuestionDTO.md)
|
- [QuestionDTO](doc\/QuestionDTO.md)
|
||||||
- [QuizzDTO](doc\/QuizzDTO.md)
|
- [QuizzDTO](doc\/QuizzDTO.md)
|
||||||
- [QuizzDTOBadLevel](doc\/QuizzDTOBadLevel.md)
|
- [QuizzDTOBadLevel](doc\/QuizzDTOBadLevel.md)
|
||||||
|
|||||||
16
manager_api_new/doc/AgendaDTO.md
Normal file
16
manager_api_new/doc/AgendaDTO.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# manager_api_new.model.AgendaDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|||||||
**isContentTop** | **bool** | | [optional]
|
**isContentTop** | **bool** | | [optional]
|
||||||
**audioIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**audioIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**isReadAudioAuto** | **bool** | | [optional]
|
**isReadAudioAuto** | **bool** | | [optional]
|
||||||
**images** | [**List<ImageDTO>**](ImageDTO.md) | | [optional] [default to const []]
|
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [optional] [default to const []]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
16
manager_api_new/doc/CategorieDTO.md
Normal file
16
manager_api_new/doc/CategorieDTO.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# manager_api_new.model.CategorieDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **String** | | [optional]
|
||||||
|
**icon** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
20
manager_api_new/doc/ContentDTO.md
Normal file
20
manager_api_new/doc/ContentDTO.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# manager_api_new.model.ContentDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
**order** | **int** | | [optional]
|
||||||
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
18
manager_api_new/doc/ContentGeoPoint.md
Normal file
18
manager_api_new/doc/ContentGeoPoint.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# manager_api_new.model.ContentGeoPoint
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
**latitude** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
@ -11,7 +11,8 @@ Name | Type | Description | Notes
|
|||||||
**id** | **int** | | [optional]
|
**id** | **int** | | [optional]
|
||||||
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**images** | [**List<ImageGeoPoint>**](ImageGeoPoint.md) | | [optional] [default to const []]
|
**contents** | [**List<ContentGeoPoint>**](ContentGeoPoint.md) | | [optional] [default to const []]
|
||||||
|
**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional]
|
||||||
**latitude** | **String** | | [optional]
|
**latitude** | **String** | | [optional]
|
||||||
**longitude** | **String** | | [optional]
|
**longitude** | **String** | | [optional]
|
||||||
|
|
||||||
|
|||||||
16
manager_api_new/doc/GeoPointDTOCategorie.md
Normal file
16
manager_api_new/doc/GeoPointDTOCategorie.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# manager_api_new.model.GeoPointDTOCategorie
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **String** | | [optional]
|
||||||
|
**icon** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|||||||
**resourceId** | **String** | | [optional]
|
**resourceId** | **String** | | [optional]
|
||||||
**source_** | **String** | | [optional]
|
**source_** | **String** | | [optional]
|
||||||
**order** | **int** | | [optional]
|
**order** | **int** | | [optional]
|
||||||
|
**type** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
@ -10,7 +10,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
**resourceId** | **String** | | [optional]
|
||||||
**source_** | **String** | | [optional]
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|||||||
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
|
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
|
||||||
**iconResourceId** | **String** | | [optional]
|
**iconResourceId** | **String** | | [optional]
|
||||||
**iconSource** | **String** | | [optional]
|
**iconSource** | **String** | | [optional]
|
||||||
|
**categories** | [**List<CategorieDTO>**](CategorieDTO.md) | | [optional] [default to const []]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
16
manager_api_new/doc/PdfDTO.md
Normal file
16
manager_api_new/doc/PdfDTO.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# manager_api_new.model.PdfDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
17
manager_api_new/doc/PuzzleDTO.md
Normal file
17
manager_api_new/doc/PuzzleDTO.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# manager_api_new.model.PuzzleDTO
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**messageDebut** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**messageFin** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
20
manager_api_new/doc/PuzzleDTOImage.md
Normal file
20
manager_api_new/doc/PuzzleDTOImage.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# manager_api_new.model.PuzzleDTOImage
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
|
**resourceId** | **String** | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
**order** | **int** | | [optional]
|
||||||
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,8 @@ Name | Type | Description | Notes
|
|||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
**resourceId** | **String** | | [optional]
|
||||||
**source_** | **String** | | [optional]
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
**order** | **int** | | [optional]
|
**order** | **int** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|||||||
@ -10,7 +10,8 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||||
**resourceId** | **String** | | [optional]
|
**resourceId** | **String** | | [optional]
|
||||||
**source_** | **String** | | [optional]
|
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
|
**resourceUrl** | **String** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**id** | **String** | | [optional]
|
**id** | **String** | | [optional]
|
||||||
**type** | [**ResourceType**](ResourceType.md) | | [optional]
|
**type** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||||
**label** | **String** | | [optional]
|
**label** | **String** | | [optional]
|
||||||
**data** | **String** | | [optional]
|
**url** | **String** | | [optional]
|
||||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
**instanceId** | **String** | | [optional]
|
**instanceId** | **String** | | [optional]
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
[**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||||
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||||
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
||||||
|
[**sectionGetAgendaDTO**](SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO |
|
||||||
[**sectionGetAllBeaconsForInstance**](SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
[**sectionGetAllBeaconsForInstance**](SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
||||||
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||||
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||||
@ -20,6 +21,8 @@ Method | HTTP request | Description
|
|||||||
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||||
[**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
[**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
||||||
[**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
[**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
|
||||||
|
[**sectionGetPdfDTO**](SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO |
|
||||||
|
[**sectionGetPuzzleDTO**](SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO |
|
||||||
[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
|
||||||
[**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
[**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
|
||||||
[**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
[**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
|
||||||
@ -201,6 +204,45 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **sectionGetAgendaDTO**
|
||||||
|
> AgendaDTO sectionGetAgendaDTO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
// TODO Configure OAuth2 access token for authorization: bearer
|
||||||
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
|
final api_instance = SectionApi();
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.sectionGetAgendaDTO();
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling SectionApi->sectionGetAgendaDTO: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**AgendaDTO**](AgendaDTO.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[bearer](../README.md#bearer)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **sectionGetAllBeaconsForInstance**
|
# **sectionGetAllBeaconsForInstance**
|
||||||
> List<SectionDTO> sectionGetAllBeaconsForInstance(instanceId)
|
> List<SectionDTO> sectionGetAllBeaconsForInstance(instanceId)
|
||||||
|
|
||||||
@ -490,6 +532,84 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **sectionGetPdfDTO**
|
||||||
|
> PdfDTO sectionGetPdfDTO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
// TODO Configure OAuth2 access token for authorization: bearer
|
||||||
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
|
final api_instance = SectionApi();
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.sectionGetPdfDTO();
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling SectionApi->sectionGetPdfDTO: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**PdfDTO**](PdfDTO.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[bearer](../README.md#bearer)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **sectionGetPuzzleDTO**
|
||||||
|
> PuzzleDTO sectionGetPuzzleDTO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
// TODO Configure OAuth2 access token for authorization: bearer
|
||||||
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
|
final api_instance = SectionApi();
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.sectionGetPuzzleDTO();
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling SectionApi->sectionGetPuzzleDTO: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**PuzzleDTO**](PuzzleDTO.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[bearer](../README.md#bearer)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **sectionGetQuizzDTO**
|
# **sectionGetQuizzDTO**
|
||||||
> QuizzDTO sectionGetQuizzDTO()
|
> QuizzDTO sectionGetQuizzDTO()
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import 'package:manager_api_new/api.dart';
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**images** | [**List<ImageDTO>**](ImageDTO.md) | | [optional] [default to const []]
|
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [optional] [default to const []]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
```
|
```
|
||||||
|
|
||||||
All URIs are relative to *https://api.mymuseum.be*
|
All URIs are relative to *http://localhost:5000*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
|||||||
@ -35,16 +35,19 @@ part 'api/resource_api.dart';
|
|||||||
part 'api/section_api.dart';
|
part 'api/section_api.dart';
|
||||||
part 'api/user_api.dart';
|
part 'api/user_api.dart';
|
||||||
|
|
||||||
|
part 'model/agenda_dto.dart';
|
||||||
part 'model/article_dto.dart';
|
part 'model/article_dto.dart';
|
||||||
|
part 'model/categorie_dto.dart';
|
||||||
part 'model/configuration_dto.dart';
|
part 'model/configuration_dto.dart';
|
||||||
|
part 'model/content_dto.dart';
|
||||||
|
part 'model/content_geo_point.dart';
|
||||||
part 'model/device_dto.dart';
|
part 'model/device_dto.dart';
|
||||||
part 'model/device_detail_dto.dart';
|
part 'model/device_detail_dto.dart';
|
||||||
part 'model/device_detail_dto_all_of.dart';
|
part 'model/device_detail_dto_all_of.dart';
|
||||||
part 'model/export_configuration_dto.dart';
|
part 'model/export_configuration_dto.dart';
|
||||||
part 'model/export_configuration_dto_all_of.dart';
|
part 'model/export_configuration_dto_all_of.dart';
|
||||||
part 'model/geo_point_dto.dart';
|
part 'model/geo_point_dto.dart';
|
||||||
part 'model/image_dto.dart';
|
part 'model/geo_point_dto_categorie.dart';
|
||||||
part 'model/image_geo_point.dart';
|
|
||||||
part 'model/instance.dart';
|
part 'model/instance.dart';
|
||||||
part 'model/instance_dto.dart';
|
part 'model/instance_dto.dart';
|
||||||
part 'model/level_dto.dart';
|
part 'model/level_dto.dart';
|
||||||
@ -52,7 +55,10 @@ part 'model/login_dto.dart';
|
|||||||
part 'model/map_dto.dart';
|
part 'model/map_dto.dart';
|
||||||
part 'model/map_type_app.dart';
|
part 'model/map_type_app.dart';
|
||||||
part 'model/menu_dto.dart';
|
part 'model/menu_dto.dart';
|
||||||
|
part 'model/pdf_dto.dart';
|
||||||
part 'model/player_message_dto.dart';
|
part 'model/player_message_dto.dart';
|
||||||
|
part 'model/puzzle_dto.dart';
|
||||||
|
part 'model/puzzle_dto_image.dart';
|
||||||
part 'model/question_dto.dart';
|
part 'model/question_dto.dart';
|
||||||
part 'model/quizz_dto.dart';
|
part 'model/quizz_dto.dart';
|
||||||
part 'model/quizz_dto_bad_level.dart';
|
part 'model/quizz_dto_bad_level.dart';
|
||||||
|
|||||||
@ -213,6 +213,47 @@ class SectionApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /api/Section/AgendaDTO' operation and returns the [Response].
|
||||||
|
Future<Response> sectionGetAgendaDTOWithHttpInfo() async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/api/Section/AgendaDTO';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<AgendaDTO?> sectionGetAgendaDTO() async {
|
||||||
|
final response = await sectionGetAgendaDTOWithHttpInfo();
|
||||||
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
|
}
|
||||||
|
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||||
|
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||||
|
// FormatException when trying to decode an empty string.
|
||||||
|
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||||
|
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AgendaDTO',) as AgendaDTO;
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /api/Section/beacons/{instanceId}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /api/Section/beacons/{instanceId}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
@ -537,6 +578,88 @@ class SectionApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /api/Section/PdfDTO' operation and returns the [Response].
|
||||||
|
Future<Response> sectionGetPdfDTOWithHttpInfo() async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/api/Section/PdfDTO';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<PdfDTO?> sectionGetPdfDTO() async {
|
||||||
|
final response = await sectionGetPdfDTOWithHttpInfo();
|
||||||
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
|
}
|
||||||
|
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||||
|
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||||
|
// FormatException when trying to decode an empty string.
|
||||||
|
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||||
|
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PdfDTO',) as PdfDTO;
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /api/Section/PuzzleDTO' operation and returns the [Response].
|
||||||
|
Future<Response> sectionGetPuzzleDTOWithHttpInfo() async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/api/Section/PuzzleDTO';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<PuzzleDTO?> sectionGetPuzzleDTO() async {
|
||||||
|
final response = await sectionGetPuzzleDTOWithHttpInfo();
|
||||||
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
|
}
|
||||||
|
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||||
|
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||||
|
// FormatException when trying to decode an empty string.
|
||||||
|
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||||
|
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PuzzleDTO',) as PuzzleDTO;
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response].
|
/// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response].
|
||||||
Future<Response> sectionGetQuizzDTOWithHttpInfo() async {
|
Future<Response> sectionGetQuizzDTOWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class ApiClient {
|
class ApiClient {
|
||||||
ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication,});
|
ApiClient({this.basePath = 'http://localhost:5000', this.authentication,});
|
||||||
|
|
||||||
final String basePath;
|
final String basePath;
|
||||||
final Authentication? authentication;
|
final Authentication? authentication;
|
||||||
@ -181,10 +181,18 @@ class ApiClient {
|
|||||||
return valueString == 'true' || valueString == '1';
|
return valueString == 'true' || valueString == '1';
|
||||||
case 'DateTime':
|
case 'DateTime':
|
||||||
return value is DateTime ? value : DateTime.tryParse(value);
|
return value is DateTime ? value : DateTime.tryParse(value);
|
||||||
|
case 'AgendaDTO':
|
||||||
|
return AgendaDTO.fromJson(value);
|
||||||
case 'ArticleDTO':
|
case 'ArticleDTO':
|
||||||
return ArticleDTO.fromJson(value);
|
return ArticleDTO.fromJson(value);
|
||||||
|
case 'CategorieDTO':
|
||||||
|
return CategorieDTO.fromJson(value);
|
||||||
case 'ConfigurationDTO':
|
case 'ConfigurationDTO':
|
||||||
return ConfigurationDTO.fromJson(value);
|
return ConfigurationDTO.fromJson(value);
|
||||||
|
case 'ContentDTO':
|
||||||
|
return ContentDTO.fromJson(value);
|
||||||
|
case 'ContentGeoPoint':
|
||||||
|
return ContentGeoPoint.fromJson(value);
|
||||||
case 'DeviceDTO':
|
case 'DeviceDTO':
|
||||||
return DeviceDTO.fromJson(value);
|
return DeviceDTO.fromJson(value);
|
||||||
case 'DeviceDetailDTO':
|
case 'DeviceDetailDTO':
|
||||||
@ -197,10 +205,8 @@ class ApiClient {
|
|||||||
return ExportConfigurationDTOAllOf.fromJson(value);
|
return ExportConfigurationDTOAllOf.fromJson(value);
|
||||||
case 'GeoPointDTO':
|
case 'GeoPointDTO':
|
||||||
return GeoPointDTO.fromJson(value);
|
return GeoPointDTO.fromJson(value);
|
||||||
case 'ImageDTO':
|
case 'GeoPointDTOCategorie':
|
||||||
return ImageDTO.fromJson(value);
|
return GeoPointDTOCategorie.fromJson(value);
|
||||||
case 'ImageGeoPoint':
|
|
||||||
return ImageGeoPoint.fromJson(value);
|
|
||||||
case 'Instance':
|
case 'Instance':
|
||||||
return Instance.fromJson(value);
|
return Instance.fromJson(value);
|
||||||
case 'InstanceDTO':
|
case 'InstanceDTO':
|
||||||
@ -215,8 +221,14 @@ class ApiClient {
|
|||||||
return MapTypeAppTypeTransformer().decode(value);
|
return MapTypeAppTypeTransformer().decode(value);
|
||||||
case 'MenuDTO':
|
case 'MenuDTO':
|
||||||
return MenuDTO.fromJson(value);
|
return MenuDTO.fromJson(value);
|
||||||
|
case 'PdfDTO':
|
||||||
|
return PdfDTO.fromJson(value);
|
||||||
case 'PlayerMessageDTO':
|
case 'PlayerMessageDTO':
|
||||||
return PlayerMessageDTO.fromJson(value);
|
return PlayerMessageDTO.fromJson(value);
|
||||||
|
case 'PuzzleDTO':
|
||||||
|
return PuzzleDTO.fromJson(value);
|
||||||
|
case 'PuzzleDTOImage':
|
||||||
|
return PuzzleDTOImage.fromJson(value);
|
||||||
case 'QuestionDTO':
|
case 'QuestionDTO':
|
||||||
return QuestionDTO.fromJson(value);
|
return QuestionDTO.fromJson(value);
|
||||||
case 'QuizzDTO':
|
case 'QuizzDTO':
|
||||||
|
|||||||
123
manager_api_new/lib/model/agenda_dto.dart
Normal file
123
manager_api_new/lib/model/agenda_dto.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class AgendaDTO {
|
||||||
|
/// Returns a new [AgendaDTO] instance.
|
||||||
|
AgendaDTO({
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceUrl,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is AgendaDTO &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceUrl == resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'AgendaDTO[resourceId=$resourceId, resourceUrl=$resourceUrl]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [AgendaDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static AgendaDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "AgendaDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "AgendaDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return AgendaDTO(
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<AgendaDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <AgendaDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = AgendaDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, AgendaDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, AgendaDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = AgendaDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of AgendaDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<AgendaDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<AgendaDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = AgendaDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ class ArticleDTO {
|
|||||||
this.isContentTop,
|
this.isContentTop,
|
||||||
this.audioIds = const [],
|
this.audioIds = const [],
|
||||||
this.isReadAudioAuto,
|
this.isReadAudioAuto,
|
||||||
this.images = const [],
|
this.contents = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? content;
|
List<TranslationDTO>? content;
|
||||||
@ -40,7 +40,7 @@ class ArticleDTO {
|
|||||||
///
|
///
|
||||||
bool? isReadAudioAuto;
|
bool? isReadAudioAuto;
|
||||||
|
|
||||||
List<ImageDTO>? images;
|
List<ContentDTO>? contents;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
|
||||||
@ -48,7 +48,7 @@ class ArticleDTO {
|
|||||||
other.isContentTop == isContentTop &&
|
other.isContentTop == isContentTop &&
|
||||||
other.audioIds == audioIds &&
|
other.audioIds == audioIds &&
|
||||||
other.isReadAudioAuto == isReadAudioAuto &&
|
other.isReadAudioAuto == isReadAudioAuto &&
|
||||||
other.images == images;
|
other.contents == contents;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -57,10 +57,10 @@ class ArticleDTO {
|
|||||||
(isContentTop == null ? 0 : isContentTop!.hashCode) +
|
(isContentTop == null ? 0 : isContentTop!.hashCode) +
|
||||||
(audioIds == null ? 0 : audioIds!.hashCode) +
|
(audioIds == null ? 0 : audioIds!.hashCode) +
|
||||||
(isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) +
|
(isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) +
|
||||||
(images == null ? 0 : images!.hashCode);
|
(contents == null ? 0 : contents!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]';
|
String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -84,10 +84,10 @@ class ArticleDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'isReadAudioAuto'] = null;
|
json[r'isReadAudioAuto'] = null;
|
||||||
}
|
}
|
||||||
if (this.images != null) {
|
if (this.contents != null) {
|
||||||
json[r'images'] = this.images;
|
json[r'contents'] = this.contents;
|
||||||
} else {
|
} else {
|
||||||
json[r'images'] = null;
|
json[r'contents'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ class ArticleDTO {
|
|||||||
isContentTop: mapValueOfType<bool>(json, r'isContentTop'),
|
isContentTop: mapValueOfType<bool>(json, r'isContentTop'),
|
||||||
audioIds: TranslationDTO.listFromJson(json[r'audioIds']),
|
audioIds: TranslationDTO.listFromJson(json[r'audioIds']),
|
||||||
isReadAudioAuto: mapValueOfType<bool>(json, r'isReadAudioAuto'),
|
isReadAudioAuto: mapValueOfType<bool>(json, r'isReadAudioAuto'),
|
||||||
images: ImageDTO.listFromJson(json[r'images']),
|
contents: ContentDTO.listFromJson(json[r'contents']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
123
manager_api_new/lib/model/categorie_dto.dart
Normal file
123
manager_api_new/lib/model/categorie_dto.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class CategorieDTO {
|
||||||
|
/// Returns a new [CategorieDTO] instance.
|
||||||
|
CategorieDTO({
|
||||||
|
this.name,
|
||||||
|
this.icon,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? name;
|
||||||
|
|
||||||
|
String? icon;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is CategorieDTO &&
|
||||||
|
other.name == name &&
|
||||||
|
other.icon == icon;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(name == null ? 0 : name!.hashCode) +
|
||||||
|
(icon == null ? 0 : icon!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'CategorieDTO[name=$name, icon=$icon]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.name != null) {
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
} else {
|
||||||
|
json[r'name'] = null;
|
||||||
|
}
|
||||||
|
if (this.icon != null) {
|
||||||
|
json[r'icon'] = this.icon;
|
||||||
|
} else {
|
||||||
|
json[r'icon'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [CategorieDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static CategorieDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "CategorieDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "CategorieDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return CategorieDTO(
|
||||||
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<CategorieDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <CategorieDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = CategorieDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, CategorieDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, CategorieDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = CategorieDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of CategorieDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<CategorieDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<CategorieDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = CategorieDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
179
manager_api_new/lib/model/content_dto.dart
Normal file
179
manager_api_new/lib/model/content_dto.dart
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class ContentDTO {
|
||||||
|
/// Returns a new [ContentDTO] instance.
|
||||||
|
ContentDTO({
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceUrl,
|
||||||
|
this.order,
|
||||||
|
this.resourceType,
|
||||||
|
});
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
int? order;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is ContentDTO &&
|
||||||
|
other.title == title &&
|
||||||
|
other.description == description &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceUrl == resourceUrl &&
|
||||||
|
other.order == order &&
|
||||||
|
other.resourceType == resourceType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(resourceType == null ? 0 : resourceType!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'ContentDTO[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
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.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceType != null) {
|
||||||
|
json[r'resourceType'] = this.resourceType;
|
||||||
|
} else {
|
||||||
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [ContentDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static ContentDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "ContentDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "ContentDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return ContentDTO(
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<ContentDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <ContentDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = ContentDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, ContentDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, ContentDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = ContentDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of ContentDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<ContentDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<ContentDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = ContentDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
151
manager_api_new/lib/model/content_geo_point.dart
Normal file
151
manager_api_new/lib/model/content_geo_point.dart
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class ContentGeoPoint {
|
||||||
|
/// Returns a new [ContentGeoPoint] instance.
|
||||||
|
ContentGeoPoint({
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceType,
|
||||||
|
this.resourceUrl,
|
||||||
|
this.latitude,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
String? latitude;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceType == resourceType &&
|
||||||
|
other.resourceUrl == resourceUrl &&
|
||||||
|
other.latitude == latitude;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||||
|
(latitude == null ? 0 : latitude!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, latitude=$latitude]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceType != null) {
|
||||||
|
json[r'resourceType'] = this.resourceType;
|
||||||
|
} else {
|
||||||
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.latitude != null) {
|
||||||
|
json[r'latitude'] = this.latitude;
|
||||||
|
} else {
|
||||||
|
json[r'latitude'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [ContentGeoPoint] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static ContentGeoPoint? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "ContentGeoPoint[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "ContentGeoPoint[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return ContentGeoPoint(
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
latitude: mapValueOfType<String>(json, r'latitude'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<ContentGeoPoint> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <ContentGeoPoint>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = ContentGeoPoint.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, ContentGeoPoint> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, ContentGeoPoint>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = ContentGeoPoint.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of ContentGeoPoint-objects as value to a dart map
|
||||||
|
static Map<String, List<ContentGeoPoint>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<ContentGeoPoint>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = ContentGeoPoint.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -16,7 +16,8 @@ class GeoPointDTO {
|
|||||||
this.id,
|
this.id,
|
||||||
this.title = const [],
|
this.title = const [],
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.images = const [],
|
this.contents = const [],
|
||||||
|
this.categorie,
|
||||||
this.latitude,
|
this.latitude,
|
||||||
this.longitude,
|
this.longitude,
|
||||||
});
|
});
|
||||||
@ -33,7 +34,9 @@ class GeoPointDTO {
|
|||||||
|
|
||||||
List<TranslationDTO>? description;
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
List<ImageGeoPoint>? images;
|
List<ContentGeoPoint>? contents;
|
||||||
|
|
||||||
|
GeoPointDTOCategorie? categorie;
|
||||||
|
|
||||||
String? latitude;
|
String? latitude;
|
||||||
|
|
||||||
@ -44,7 +47,8 @@ class GeoPointDTO {
|
|||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.title == title &&
|
other.title == title &&
|
||||||
other.description == description &&
|
other.description == description &&
|
||||||
other.images == images &&
|
other.contents == contents &&
|
||||||
|
other.categorie == categorie &&
|
||||||
other.latitude == latitude &&
|
other.latitude == latitude &&
|
||||||
other.longitude == longitude;
|
other.longitude == longitude;
|
||||||
|
|
||||||
@ -54,12 +58,13 @@ class GeoPointDTO {
|
|||||||
(id == null ? 0 : id!.hashCode) +
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(title == null ? 0 : title!.hashCode) +
|
(title == null ? 0 : title!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(images == null ? 0 : images!.hashCode) +
|
(contents == null ? 0 : contents!.hashCode) +
|
||||||
|
(categorie == null ? 0 : categorie!.hashCode) +
|
||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
(latitude == null ? 0 : latitude!.hashCode) +
|
||||||
(longitude == null ? 0 : longitude!.hashCode);
|
(longitude == null ? 0 : longitude!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]';
|
String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, latitude=$latitude, longitude=$longitude]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -78,10 +83,15 @@ class GeoPointDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
json[r'description'] = null;
|
||||||
}
|
}
|
||||||
if (this.images != null) {
|
if (this.contents != null) {
|
||||||
json[r'images'] = this.images;
|
json[r'contents'] = this.contents;
|
||||||
} else {
|
} else {
|
||||||
json[r'images'] = null;
|
json[r'contents'] = null;
|
||||||
|
}
|
||||||
|
if (this.categorie != null) {
|
||||||
|
json[r'categorie'] = this.categorie;
|
||||||
|
} else {
|
||||||
|
json[r'categorie'] = null;
|
||||||
}
|
}
|
||||||
if (this.latitude != null) {
|
if (this.latitude != null) {
|
||||||
json[r'latitude'] = this.latitude;
|
json[r'latitude'] = this.latitude;
|
||||||
@ -118,7 +128,8 @@ class GeoPointDTO {
|
|||||||
id: mapValueOfType<int>(json, r'id'),
|
id: mapValueOfType<int>(json, r'id'),
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
images: ImageGeoPoint.listFromJson(json[r'images']),
|
contents: ContentGeoPoint.listFromJson(json[r'contents']),
|
||||||
|
categorie: GeoPointDTOCategorie.fromJson(json[r'categorie']),
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
latitude: mapValueOfType<String>(json, r'latitude'),
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
longitude: mapValueOfType<String>(json, r'longitude'),
|
||||||
);
|
);
|
||||||
|
|||||||
123
manager_api_new/lib/model/geo_point_dto_categorie.dart
Normal file
123
manager_api_new/lib/model/geo_point_dto_categorie.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class GeoPointDTOCategorie {
|
||||||
|
/// Returns a new [GeoPointDTOCategorie] instance.
|
||||||
|
GeoPointDTOCategorie({
|
||||||
|
this.name,
|
||||||
|
this.icon,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? name;
|
||||||
|
|
||||||
|
String? icon;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie &&
|
||||||
|
other.name == name &&
|
||||||
|
other.icon == icon;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(name == null ? 0 : name!.hashCode) +
|
||||||
|
(icon == null ? 0 : icon!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'GeoPointDTOCategorie[name=$name, icon=$icon]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.name != null) {
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
} else {
|
||||||
|
json[r'name'] = null;
|
||||||
|
}
|
||||||
|
if (this.icon != null) {
|
||||||
|
json[r'icon'] = this.icon;
|
||||||
|
} else {
|
||||||
|
json[r'icon'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeoPointDTOCategorie] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeoPointDTOCategorie? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeoPointDTOCategorie(
|
||||||
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeoPointDTOCategorie> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <GeoPointDTOCategorie>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeoPointDTOCategorie.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeoPointDTOCategorie> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GeoPointDTOCategorie>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeoPointDTOCategorie.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map
|
||||||
|
static Map<String, List<GeoPointDTOCategorie>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<GeoPointDTOCategorie>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeoPointDTOCategorie.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ class ImageDTO {
|
|||||||
this.resourceId,
|
this.resourceId,
|
||||||
this.source_,
|
this.source_,
|
||||||
this.order,
|
this.order,
|
||||||
|
this.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
List<TranslationDTO>? title;
|
||||||
@ -36,13 +37,22 @@ class ImageDTO {
|
|||||||
///
|
///
|
||||||
int? order;
|
int? order;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? type;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is ImageDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is ImageDTO &&
|
||||||
other.title == title &&
|
other.title == title &&
|
||||||
other.description == description &&
|
other.description == description &&
|
||||||
other.resourceId == resourceId &&
|
other.resourceId == resourceId &&
|
||||||
other.source_ == source_ &&
|
other.source_ == source_ &&
|
||||||
other.order == order;
|
other.order == order &&
|
||||||
|
other.type == type;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -51,10 +61,11 @@ class ImageDTO {
|
|||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
(source_ == null ? 0 : source_!.hashCode) +
|
(source_ == null ? 0 : source_!.hashCode) +
|
||||||
(order == null ? 0 : order!.hashCode);
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(type == null ? 0 : type!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]';
|
String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order, type=$type]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -83,6 +94,11 @@ class ImageDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'order'] = null;
|
json[r'order'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.type != null) {
|
||||||
|
json[r'type'] = this.type;
|
||||||
|
} else {
|
||||||
|
json[r'type'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,6 +126,7 @@ class ImageDTO {
|
|||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
source_: mapValueOfType<String>(json, r'source'),
|
source_: mapValueOfType<String>(json, r'source'),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
type: ResourceType.fromJson(json[r'type']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -15,30 +15,41 @@ class LevelDTO {
|
|||||||
LevelDTO({
|
LevelDTO({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.resourceId,
|
this.resourceId,
|
||||||
this.source_,
|
this.resourceType,
|
||||||
|
this.resourceUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
String? resourceId;
|
String? resourceId;
|
||||||
|
|
||||||
String? source_;
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.resourceId == resourceId &&
|
other.resourceId == resourceId &&
|
||||||
other.source_ == source_;
|
other.resourceType == resourceType &&
|
||||||
|
other.resourceUrl == resourceUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
(source_ == null ? 0 : source_!.hashCode);
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]';
|
String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -52,10 +63,15 @@ class LevelDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'resourceId'] = null;
|
||||||
}
|
}
|
||||||
if (this.source_ != null) {
|
if (this.resourceType != null) {
|
||||||
json[r'source'] = this.source_;
|
json[r'resourceType'] = this.resourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'source'] = null;
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -81,7 +97,8 @@ class LevelDTO {
|
|||||||
return LevelDTO(
|
return LevelDTO(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
source_: mapValueOfType<String>(json, r'source'),
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class MapDTO {
|
|||||||
this.points = const [],
|
this.points = const [],
|
||||||
this.iconResourceId,
|
this.iconResourceId,
|
||||||
this.iconSource,
|
this.iconSource,
|
||||||
|
this.categories = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -42,13 +43,16 @@ class MapDTO {
|
|||||||
|
|
||||||
String? iconSource;
|
String? iconSource;
|
||||||
|
|
||||||
|
List<CategorieDTO>? categories;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
||||||
other.zoom == zoom &&
|
other.zoom == zoom &&
|
||||||
other.mapType == mapType &&
|
other.mapType == mapType &&
|
||||||
other.points == points &&
|
other.points == points &&
|
||||||
other.iconResourceId == iconResourceId &&
|
other.iconResourceId == iconResourceId &&
|
||||||
other.iconSource == iconSource;
|
other.iconSource == iconSource &&
|
||||||
|
other.categories == categories;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -57,10 +61,11 @@ class MapDTO {
|
|||||||
(mapType == null ? 0 : mapType!.hashCode) +
|
(mapType == null ? 0 : mapType!.hashCode) +
|
||||||
(points == null ? 0 : points!.hashCode) +
|
(points == null ? 0 : points!.hashCode) +
|
||||||
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
(iconSource == null ? 0 : iconSource!.hashCode);
|
(iconSource == null ? 0 : iconSource!.hashCode) +
|
||||||
|
(categories == null ? 0 : categories!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]';
|
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -89,6 +94,11 @@ class MapDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'iconSource'] = null;
|
json[r'iconSource'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.categories != null) {
|
||||||
|
json[r'categories'] = this.categories;
|
||||||
|
} else {
|
||||||
|
json[r'categories'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +126,7 @@ class MapDTO {
|
|||||||
points: GeoPointDTO.listFromJson(json[r'points']),
|
points: GeoPointDTO.listFromJson(json[r'points']),
|
||||||
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
iconSource: mapValueOfType<String>(json, r'iconSource'),
|
iconSource: mapValueOfType<String>(json, r'iconSource'),
|
||||||
|
categories: CategorieDTO.listFromJson(json[r'categories']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
123
manager_api_new/lib/model/pdf_dto.dart
Normal file
123
manager_api_new/lib/model/pdf_dto.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class PdfDTO {
|
||||||
|
/// Returns a new [PdfDTO] instance.
|
||||||
|
PdfDTO({
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceUrl,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is PdfDTO &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceUrl == resourceUrl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'PdfDTO[resourceId=$resourceId, resourceUrl=$resourceUrl]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PdfDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PdfDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "PdfDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "PdfDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PdfDTO(
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PdfDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <PdfDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PdfDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PdfDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PdfDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PdfDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PdfDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<PdfDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<PdfDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PdfDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
134
manager_api_new/lib/model/puzzle_dto.dart
Normal file
134
manager_api_new/lib/model/puzzle_dto.dart
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class PuzzleDTO {
|
||||||
|
/// Returns a new [PuzzleDTO] instance.
|
||||||
|
PuzzleDTO({
|
||||||
|
this.messageDebut = const [],
|
||||||
|
this.messageFin = const [],
|
||||||
|
this.image,
|
||||||
|
});
|
||||||
|
|
||||||
|
List<TranslationDTO>? messageDebut;
|
||||||
|
|
||||||
|
List<TranslationDTO>? messageFin;
|
||||||
|
|
||||||
|
PuzzleDTOImage? image;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is PuzzleDTO &&
|
||||||
|
other.messageDebut == messageDebut &&
|
||||||
|
other.messageFin == messageFin &&
|
||||||
|
other.image == image;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(messageDebut == null ? 0 : messageDebut!.hashCode) +
|
||||||
|
(messageFin == null ? 0 : messageFin!.hashCode) +
|
||||||
|
(image == null ? 0 : image!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'PuzzleDTO[messageDebut=$messageDebut, messageFin=$messageFin, image=$image]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.messageDebut != null) {
|
||||||
|
json[r'messageDebut'] = this.messageDebut;
|
||||||
|
} else {
|
||||||
|
json[r'messageDebut'] = null;
|
||||||
|
}
|
||||||
|
if (this.messageFin != null) {
|
||||||
|
json[r'messageFin'] = this.messageFin;
|
||||||
|
} else {
|
||||||
|
json[r'messageFin'] = null;
|
||||||
|
}
|
||||||
|
if (this.image != null) {
|
||||||
|
json[r'image'] = this.image;
|
||||||
|
} else {
|
||||||
|
json[r'image'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PuzzleDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PuzzleDTO? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "PuzzleDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "PuzzleDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PuzzleDTO(
|
||||||
|
messageDebut: TranslationDTO.listFromJson(json[r'messageDebut']),
|
||||||
|
messageFin: TranslationDTO.listFromJson(json[r'messageFin']),
|
||||||
|
image: PuzzleDTOImage.fromJson(json[r'image']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PuzzleDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <PuzzleDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PuzzleDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PuzzleDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PuzzleDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PuzzleDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PuzzleDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<PuzzleDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<PuzzleDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PuzzleDTO.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
179
manager_api_new/lib/model/puzzle_dto_image.dart
Normal file
179
manager_api_new/lib/model/puzzle_dto_image.dart
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
class PuzzleDTOImage {
|
||||||
|
/// Returns a new [PuzzleDTOImage] instance.
|
||||||
|
PuzzleDTOImage({
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.resourceId,
|
||||||
|
this.resourceUrl,
|
||||||
|
this.order,
|
||||||
|
this.resourceType,
|
||||||
|
});
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
String? resourceId;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
int? order;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is PuzzleDTOImage &&
|
||||||
|
other.title == title &&
|
||||||
|
other.description == description &&
|
||||||
|
other.resourceId == resourceId &&
|
||||||
|
other.resourceUrl == resourceUrl &&
|
||||||
|
other.order == order &&
|
||||||
|
other.resourceType == resourceType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(resourceType == null ? 0 : resourceType!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
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.resourceId != null) {
|
||||||
|
json[r'resourceId'] = this.resourceId;
|
||||||
|
} else {
|
||||||
|
json[r'resourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceType != null) {
|
||||||
|
json[r'resourceType'] = this.resourceType;
|
||||||
|
} else {
|
||||||
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PuzzleDTOImage] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PuzzleDTOImage? fromJson(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
// Ensure that the map contains the required keys.
|
||||||
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||||
|
// Note 2: this code is stripped in release mode!
|
||||||
|
assert(() {
|
||||||
|
requiredKeys.forEach((key) {
|
||||||
|
assert(json.containsKey(key), 'Required key "PuzzleDTOImage[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PuzzleDTOImage(
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PuzzleDTOImage> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <PuzzleDTOImage>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PuzzleDTOImage.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PuzzleDTOImage> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PuzzleDTOImage>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PuzzleDTOImage.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PuzzleDTOImage-objects as value to a dart map
|
||||||
|
static Map<String, List<PuzzleDTOImage>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<PuzzleDTOImage>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PuzzleDTOImage.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -16,7 +16,8 @@ class QuestionDTO {
|
|||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.responses = const [],
|
this.responses = const [],
|
||||||
this.resourceId,
|
this.resourceId,
|
||||||
this.source_,
|
this.resourceType,
|
||||||
|
this.resourceUrl,
|
||||||
this.order,
|
this.order,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -26,7 +27,15 @@ class QuestionDTO {
|
|||||||
|
|
||||||
String? resourceId;
|
String? resourceId;
|
||||||
|
|
||||||
String? source_;
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -41,7 +50,8 @@ class QuestionDTO {
|
|||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.responses == responses &&
|
other.responses == responses &&
|
||||||
other.resourceId == resourceId &&
|
other.resourceId == resourceId &&
|
||||||
other.source_ == source_ &&
|
other.resourceType == resourceType &&
|
||||||
|
other.resourceUrl == resourceUrl &&
|
||||||
other.order == order;
|
other.order == order;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -50,11 +60,12 @@ class QuestionDTO {
|
|||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(responses == null ? 0 : responses!.hashCode) +
|
(responses == null ? 0 : responses!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
(source_ == null ? 0 : source_!.hashCode) +
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||||
(order == null ? 0 : order!.hashCode);
|
(order == null ? 0 : order!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]';
|
String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -73,10 +84,15 @@ class QuestionDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'resourceId'] = null;
|
||||||
}
|
}
|
||||||
if (this.source_ != null) {
|
if (this.resourceType != null) {
|
||||||
json[r'source'] = this.source_;
|
json[r'resourceType'] = this.resourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'source'] = null;
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
}
|
}
|
||||||
if (this.order != null) {
|
if (this.order != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'order'] = this.order;
|
||||||
@ -108,7 +124,8 @@ class QuestionDTO {
|
|||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
responses: ResponseDTO.listFromJson(json[r'responses']),
|
responses: ResponseDTO.listFromJson(json[r'responses']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
source_: mapValueOfType<String>(json, r'source'),
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,30 +15,41 @@ class QuizzDTOBadLevel {
|
|||||||
QuizzDTOBadLevel({
|
QuizzDTOBadLevel({
|
||||||
this.label = const [],
|
this.label = const [],
|
||||||
this.resourceId,
|
this.resourceId,
|
||||||
this.source_,
|
this.resourceType,
|
||||||
|
this.resourceUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
String? resourceId;
|
String? resourceId;
|
||||||
|
|
||||||
String? source_;
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
ResourceType? resourceType;
|
||||||
|
|
||||||
|
String? resourceUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel &&
|
bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.resourceId == resourceId &&
|
other.resourceId == resourceId &&
|
||||||
other.source_ == source_;
|
other.resourceType == resourceType &&
|
||||||
|
other.resourceUrl == resourceUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||||
(source_ == null ? 0 : source_!.hashCode);
|
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||||
|
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, source_=$source_]';
|
String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -52,10 +63,15 @@ class QuizzDTOBadLevel {
|
|||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'resourceId'] = null;
|
||||||
}
|
}
|
||||||
if (this.source_ != null) {
|
if (this.resourceType != null) {
|
||||||
json[r'source'] = this.source_;
|
json[r'resourceType'] = this.resourceType;
|
||||||
} else {
|
} else {
|
||||||
json[r'source'] = null;
|
json[r'resourceType'] = null;
|
||||||
|
}
|
||||||
|
if (this.resourceUrl != null) {
|
||||||
|
json[r'resourceUrl'] = this.resourceUrl;
|
||||||
|
} else {
|
||||||
|
json[r'resourceUrl'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -81,7 +97,8 @@ class QuizzDTOBadLevel {
|
|||||||
return QuizzDTOBadLevel(
|
return QuizzDTOBadLevel(
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||||
source_: mapValueOfType<String>(json, r'source'),
|
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||||
|
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class ResourceDTO {
|
|||||||
this.id,
|
this.id,
|
||||||
this.type,
|
this.type,
|
||||||
this.label,
|
this.label,
|
||||||
this.data,
|
this.url,
|
||||||
this.dateCreation,
|
this.dateCreation,
|
||||||
this.instanceId,
|
this.instanceId,
|
||||||
});
|
});
|
||||||
@ -33,7 +33,7 @@ class ResourceDTO {
|
|||||||
|
|
||||||
String? label;
|
String? label;
|
||||||
|
|
||||||
String? data;
|
String? url;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -50,7 +50,7 @@ class ResourceDTO {
|
|||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.type == type &&
|
other.type == type &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
other.data == data &&
|
other.url == url &&
|
||||||
other.dateCreation == dateCreation &&
|
other.dateCreation == dateCreation &&
|
||||||
other.instanceId == instanceId;
|
other.instanceId == instanceId;
|
||||||
|
|
||||||
@ -60,12 +60,12 @@ class ResourceDTO {
|
|||||||
(id == null ? 0 : id!.hashCode) +
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(type == null ? 0 : type!.hashCode) +
|
(type == null ? 0 : type!.hashCode) +
|
||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(data == null ? 0 : data!.hashCode) +
|
(url == null ? 0 : url!.hashCode) +
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
(instanceId == null ? 0 : instanceId!.hashCode);
|
(instanceId == null ? 0 : instanceId!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, data=$data, dateCreation=$dateCreation, instanceId=$instanceId]';
|
String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -84,10 +84,10 @@ class ResourceDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'label'] = null;
|
json[r'label'] = null;
|
||||||
}
|
}
|
||||||
if (this.data != null) {
|
if (this.url != null) {
|
||||||
json[r'data'] = this.data;
|
json[r'url'] = this.url;
|
||||||
} else {
|
} else {
|
||||||
json[r'data'] = null;
|
json[r'url'] = null;
|
||||||
}
|
}
|
||||||
if (this.dateCreation != null) {
|
if (this.dateCreation != null) {
|
||||||
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
||||||
@ -124,7 +124,7 @@ class ResourceDTO {
|
|||||||
id: mapValueOfType<String>(json, r'id'),
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
type: ResourceType.fromJson(json[r'type']),
|
type: ResourceType.fromJson(json[r'type']),
|
||||||
label: mapValueOfType<String>(json, r'label'),
|
label: mapValueOfType<String>(json, r'label'),
|
||||||
data: mapValueOfType<String>(json, r'data'),
|
url: mapValueOfType<String>(json, r'url'),
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,6 +28,8 @@ class ResourceType {
|
|||||||
static const ImageUrl = ResourceType._(2);
|
static const ImageUrl = ResourceType._(2);
|
||||||
static const VideoUrl = ResourceType._(3);
|
static const VideoUrl = ResourceType._(3);
|
||||||
static const Audio = ResourceType._(4);
|
static const Audio = ResourceType._(4);
|
||||||
|
static const Pdf = ResourceType._(5);
|
||||||
|
static const Json = ResourceType._(6);
|
||||||
|
|
||||||
/// List of all possible values in this [enum][ResourceType].
|
/// List of all possible values in this [enum][ResourceType].
|
||||||
static const values = <ResourceType>[
|
static const values = <ResourceType>[
|
||||||
@ -35,7 +37,9 @@ class ResourceType {
|
|||||||
Video,
|
Video,
|
||||||
ImageUrl,
|
ImageUrl,
|
||||||
VideoUrl,
|
VideoUrl,
|
||||||
Audio
|
Audio,
|
||||||
|
Pdf,
|
||||||
|
Json
|
||||||
];
|
];
|
||||||
|
|
||||||
static ResourceType? fromJson(dynamic value) => ResourceTypeTypeTransformer().decode(value);
|
static ResourceType? fromJson(dynamic value) => ResourceTypeTypeTransformer().decode(value);
|
||||||
@ -80,6 +84,8 @@ class ResourceTypeTypeTransformer {
|
|||||||
case "ImageUrl": return ResourceType.ImageUrl;
|
case "ImageUrl": return ResourceType.ImageUrl;
|
||||||
case "VideoUrl": return ResourceType.VideoUrl;
|
case "VideoUrl": return ResourceType.VideoUrl;
|
||||||
case "Audio": return ResourceType.Audio;
|
case "Audio": return ResourceType.Audio;
|
||||||
|
case "PDF": return ResourceType.Pdf;
|
||||||
|
case "JSON": return ResourceType.Json;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
@ -93,6 +99,8 @@ class ResourceTypeTypeTransformer {
|
|||||||
case 2: return ResourceType.ImageUrl;
|
case 2: return ResourceType.ImageUrl;
|
||||||
case 3: return ResourceType.VideoUrl;
|
case 3: return ResourceType.VideoUrl;
|
||||||
case 4: return ResourceType.Audio;
|
case 4: return ResourceType.Audio;
|
||||||
|
case 5: return ResourceType.Pdf;
|
||||||
|
case 6: return ResourceType.Json;
|
||||||
default:
|
default:
|
||||||
if (!allowNull) {
|
if (!allowNull) {
|
||||||
throw ArgumentError('Unknown enum value to decode: $data');
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
|||||||
@ -13,29 +13,29 @@ part of openapi.api;
|
|||||||
class SliderDTO {
|
class SliderDTO {
|
||||||
/// Returns a new [SliderDTO] instance.
|
/// Returns a new [SliderDTO] instance.
|
||||||
SliderDTO({
|
SliderDTO({
|
||||||
this.images = const [],
|
this.contents = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
List<ImageDTO>? images;
|
List<ContentDTO>? contents;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is SliderDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is SliderDTO &&
|
||||||
other.images == images;
|
other.contents == contents;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(images == null ? 0 : images!.hashCode);
|
(contents == null ? 0 : contents!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'SliderDTO[images=$images]';
|
String toString() => 'SliderDTO[contents=$contents]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
if (this.images != null) {
|
if (this.contents != null) {
|
||||||
json[r'images'] = this.images;
|
json[r'contents'] = this.contents;
|
||||||
} else {
|
} else {
|
||||||
json[r'images'] = null;
|
json[r'contents'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ class SliderDTO {
|
|||||||
}());
|
}());
|
||||||
|
|
||||||
return SliderDTO(
|
return SliderDTO(
|
||||||
images: ImageDTO.listFromJson(json[r'images']),
|
contents: ContentDTO.listFromJson(json[r'contents']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
27
manager_api_new/test/agenda_dto_test.dart
Normal file
27
manager_api_new/test/agenda_dto_test.dart
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for AgendaDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = AgendaDTO();
|
||||||
|
|
||||||
|
group('test AgendaDTO', () {
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
32
manager_api_new/test/categorie_dto_test.dart
Normal file
32
manager_api_new/test/categorie_dto_test.dart
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for CategorieDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = CategorieDTO();
|
||||||
|
|
||||||
|
group('test CategorieDTO', () {
|
||||||
|
// String name
|
||||||
|
test('to test the property `name`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String icon
|
||||||
|
test('to test the property `icon`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
52
manager_api_new/test/content_dto_test.dart
Normal file
52
manager_api_new/test/content_dto_test.dart
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for ContentDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = ContentDTO();
|
||||||
|
|
||||||
|
group('test ContentDTO', () {
|
||||||
|
// List<TranslationDTO> title (default value: const [])
|
||||||
|
test('to test the property `title`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// List<TranslationDTO> description (default value: const [])
|
||||||
|
test('to test the property `description`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceUrl
|
||||||
|
test('to test the property `resourceUrl`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// int order
|
||||||
|
test('to test the property `order`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// ResourceType resourceType
|
||||||
|
test('to test the property `resourceType`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
42
manager_api_new/test/content_geo_point_test.dart
Normal file
42
manager_api_new/test/content_geo_point_test.dart
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for ContentGeoPoint
|
||||||
|
void main() {
|
||||||
|
// final instance = ContentGeoPoint();
|
||||||
|
|
||||||
|
group('test ContentGeoPoint', () {
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// ResourceType resourceType
|
||||||
|
test('to test the property `resourceType`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceUrl
|
||||||
|
test('to test the property `resourceUrl`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String latitude
|
||||||
|
test('to test the property `latitude`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
32
manager_api_new/test/geo_point_dto_categorie_test.dart
Normal file
32
manager_api_new/test/geo_point_dto_categorie_test.dart
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for GeoPointDTOCategorie
|
||||||
|
void main() {
|
||||||
|
// final instance = GeoPointDTOCategorie();
|
||||||
|
|
||||||
|
group('test GeoPointDTOCategorie', () {
|
||||||
|
// String name
|
||||||
|
test('to test the property `name`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String icon
|
||||||
|
test('to test the property `icon`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
27
manager_api_new/test/pdf_dto_test.dart
Normal file
27
manager_api_new/test/pdf_dto_test.dart
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for PdfDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = PdfDTO();
|
||||||
|
|
||||||
|
group('test PdfDTO', () {
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
52
manager_api_new/test/puzzle_dto_image_test.dart
Normal file
52
manager_api_new/test/puzzle_dto_image_test.dart
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for PuzzleDTOImage
|
||||||
|
void main() {
|
||||||
|
// final instance = PuzzleDTOImage();
|
||||||
|
|
||||||
|
group('test PuzzleDTOImage', () {
|
||||||
|
// List<TranslationDTO> title (default value: const [])
|
||||||
|
test('to test the property `title`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// List<TranslationDTO> description (default value: const [])
|
||||||
|
test('to test the property `description`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String resourceId
|
||||||
|
test('to test the property `resourceId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String source_
|
||||||
|
test('to test the property `source_`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// int order
|
||||||
|
test('to test the property `order`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// ResourceType type
|
||||||
|
test('to test the property `type`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
37
manager_api_new/test/puzzle_dto_test.dart
Normal file
37
manager_api_new/test/puzzle_dto_test.dart
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.12
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for PuzzleDTO
|
||||||
|
void main() {
|
||||||
|
// final instance = PuzzleDTO();
|
||||||
|
|
||||||
|
group('test PuzzleDTO', () {
|
||||||
|
// List<TranslationDTO> messageDebut (default value: const [])
|
||||||
|
test('to test the property `messageDebut`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// List<TranslationDTO> messageFin (default value: const [])
|
||||||
|
test('to test the property `messageFin`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// PuzzleDTOImage image
|
||||||
|
test('to test the property `image`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user