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;
|
2020-01-29 11:00:48 +01:00
|
|
|
DateTime created;
|
2019-12-04 15:02:22 +01:00
|
|
|
GiteaUser();
|
|
|
|
factory GiteaUser.fromJson(Map<String, dynamic> json) =>
|
|
|
|
_$GiteaUserFromJson(json);
|
|
|
|
}
|
|
|
|
|
2020-01-29 11:00:48 +01:00
|
|
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
2019-12-04 15:02:22 +01:00
|
|
|
class GiteaRepository {
|
|
|
|
int id;
|
|
|
|
GiteaUser owner;
|
|
|
|
String name;
|
|
|
|
String description;
|
|
|
|
int starsCount;
|
|
|
|
int forksCount;
|
2020-01-29 11:00:48 +01:00
|
|
|
DateTime updatedAt;
|
2019-12-04 15:02:22 +01:00
|
|
|
GiteaRepository();
|
|
|
|
factory GiteaRepository.fromJson(Map<String, dynamic> json) =>
|
|
|
|
_$GiteaRepositoryFromJson(json);
|
|
|
|
}
|