1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 03:33:42 +01:00
git-touch-android-ios-app/lib/models/gitea.dart

32 lines
598 B
Dart
Raw Normal View History

2019-12-04 15:02:22 +01:00
import 'package:json_annotation/json_annotation.dart';
part 'gitea.g.dart';
@JsonSerializable(fieldRename: FieldRename.snake)
class GiteaUser {
int id;
String login;
String fullName;
String avatarUrl;
GiteaUser();
factory GiteaUser.fromJson(Map<String, dynamic> json) =>
_$GiteaUserFromJson(json);
}
@JsonSerializable()
class GiteaRepository {
int id;
GiteaUser owner;
String name;
String description;
int starsCount;
int forksCount;
GiteaRepository();
factory GiteaRepository.fromJson(Map<String, dynamic> json) =>
_$GiteaRepositoryFromJson(json);
}