1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-26 15:55:02 +01:00
git-touch-android-ios-app/lib/models/gitea.dart
2019-12-04 22:02:22 +08:00

32 lines
598 B
Dart

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);
}