forked from PalisadoesFoundation/talawa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Venue Management for Event Plugin (GSoC) (PalisadoesFoundation#2527)
* Venue Management for Event Plugin (GSoC) * adding tests * adding tests * fixing tests * fixing tests * fixing tests * fixing tests * making required changes
- Loading branch information
Showing
13 changed files
with
1,012 additions
and
117 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/// The `Venue` class represents a venue for events. | ||
class Venue { | ||
/// Constructs a `Venue` instance. | ||
/// | ||
/// [id] is the unique identifier of the venue. | ||
/// [capacity] is the maximum number of people the venue can accommodate. | ||
/// [description] provides additional details about the venue. | ||
/// [imageUrl] is the URL of the venue's image. | ||
/// [name] is the name of the venue. | ||
/// [organizationId] is the identifier of the organization to which the venue belongs. | ||
Venue({ | ||
this.id, | ||
this.capacity, | ||
this.description, | ||
this.imageUrl, | ||
this.name, | ||
this.organizationId, | ||
}); | ||
|
||
/// Creates a `Venue` instance from a JSON object. | ||
/// | ||
/// The [json] parameter is a map containing the venue data. | ||
/// | ||
/// Returns an instance of `Venue`. | ||
factory Venue.fromJson(Map<String, dynamic> json) { | ||
return Venue( | ||
id: json['_id'] as String?, | ||
capacity: json['capacity'] as int?, | ||
description: json['description'] as String?, | ||
imageUrl: json['imageUrl'] as String? ?? '', | ||
name: json['name'] as String?, | ||
organizationId: | ||
(json['organization'] as Map<String, dynamic>?)?['_id'] as String?, | ||
); | ||
} | ||
|
||
/// The unique identifier of the venue. | ||
final String? id; | ||
|
||
/// The maximum number of people the venue can accommodate. | ||
final int? capacity; | ||
|
||
/// Provides additional details about the venue. | ||
final String? description; | ||
|
||
/// The URL of the venue's image. | ||
final String? imageUrl; | ||
|
||
/// The name of the venue. | ||
final String? name; | ||
|
||
/// The identifier of the organization to which the venue belongs. | ||
final String? organizationId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.