Insparkspokalen-ui/lib/models/activityModel.dart
pompo96 982a910ee3 Bugfixes:
Cant join team if in team
Profile page resets properly
Post button spam no longer leads to crash due to duplicate calls

Housekeeping:
Made some name changes
moved homescreenpages from layout -> homeFeed
Deleted 2 unused classes, authService.dart and old loginPage.dart then renamed startPage.dart -> loginPage.dart

Set up openApi on backend and added URL in Service classes
2025-05-25 11:40:03 +02:00

30 lines
776 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'autogenerated/activityModel.g.dart';
@JsonSerializable()
class ActivityModel {
final int? id; // ID är nu valfritt, eftersom vi kanske inte alltid får ett id vid skapande.
final String name;
final String startTime;
final String place;
final String? description;
final DateTime date;
final String? endTime;
ActivityModel({
this.id, // Om id finns, ska det kunna användas.
required this.name,
required this.startTime,
required this.place,
this.description,
required this.date,
this.endTime,
});
factory ActivityModel.fromJson(Map<String, dynamic> json) =>
_$ActivityModelFromJson(json);
Map<String, dynamic> toJson() => _$ActivityModelToJson(this);
}