Add Teams endpoint and endpoints with service

This commit is contained in:
2026-03-09 15:48:47 +01:00
parent 67d4288c84
commit ea45d74c0f
7 changed files with 383 additions and 44 deletions

View File

@@ -0,0 +1,36 @@
class Team {
final int id;
final String name;
final String tag;
final String description;
final String createdAt;
Team({
required this.id,
required this.name,
required this.tag,
required this.description,
required this.createdAt,
});
factory Team.fromJson(Map<String, dynamic> json) {
return Team(
id: json['id'] as int,
name: json['name'] as String,
tag: json['tag'] as String,
description: (json['description'] as String?) ?? '',
createdAt: (json['createdAt'] as String?) ?? '',
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'tag': tag,
'description': description,
'createdAt': createdAt,
};
}
}