-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
But some detail not complete: 1. submit summary 2. image crop or resize
- Loading branch information
Showing
12 changed files
with
958 additions
and
173 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// To parse this JSON data, do | ||
// | ||
// final leavesSubmitInfoData = leavesSubmitInfoDataFromJson(jsonString); | ||
|
||
import 'dart:convert'; | ||
|
||
class LeavesSubmitInfoData { | ||
Tutor tutor; | ||
List<Type> type; | ||
List<String> timeCodes; | ||
|
||
LeavesSubmitInfoData({ | ||
this.tutor, | ||
this.type, | ||
this.timeCodes, | ||
}); | ||
|
||
factory LeavesSubmitInfoData.fromRawJson(String str) => LeavesSubmitInfoData.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory LeavesSubmitInfoData.fromJson(Map<String, dynamic> json) => LeavesSubmitInfoData( | ||
tutor: json["tutor"] == null ? null : Tutor.fromJson(json["tutor"]), | ||
type: json["type"] == null ? null : List<Type>.from(json["type"].map((x) => Type.fromJson(x))), | ||
timeCodes: json["timeCodes"] == null ? null : List<String>.from(json["timeCodes"].map((x) => x)), | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"tutor": tutor == null ? null : tutor.toJson(), | ||
"type": type == null ? null : List<dynamic>.from(type.map((x) => x.toJson())), | ||
"timeCodes": timeCodes == null ? null : List<dynamic>.from(timeCodes.map((x) => x)), | ||
}; | ||
} | ||
|
||
class Tutor { | ||
String name; | ||
String id; | ||
|
||
Tutor({ | ||
this.name, | ||
this.id, | ||
}); | ||
|
||
factory Tutor.fromRawJson(String str) => Tutor.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory Tutor.fromJson(Map<String, dynamic> json) => Tutor( | ||
name: json["name"] == null ? null : json["name"], | ||
id: json["id"] == null ? null : json["id"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"name": name == null ? null : name, | ||
"id": id == null ? null : id, | ||
}; | ||
} | ||
|
||
class Type { | ||
String title; | ||
String id; | ||
|
||
Type({ | ||
this.title, | ||
this.id, | ||
}); | ||
|
||
factory Type.fromRawJson(String str) => Type.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory Type.fromJson(Map<String, dynamic> json) => Type( | ||
title: json["title"] == null ? null : json["title"], | ||
id: json["id"] == null ? null : json["id"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"title": title == null ? null : title, | ||
"id": id == null ? null : id, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// To parse this JSON data, do | ||
// | ||
// final campus = campusFromJson(jsonString); | ||
|
||
import 'dart:convert'; | ||
|
||
class LeavesCampusData { | ||
List<LeavesCampus> data; | ||
|
||
LeavesCampusData({ | ||
this.data, | ||
}); | ||
|
||
factory LeavesCampusData.fromRawJson(String str) => LeavesCampusData.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory LeavesCampusData.fromJson(Map<String, dynamic> json) => LeavesCampusData( | ||
data: json["data"] == null ? null : List<LeavesCampus>.from(json["data"].map((x) => LeavesCampus.fromJson(x))), | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"data": data == null ? null : List<dynamic>.from(data.map((x) => x.toJson())), | ||
}; | ||
} | ||
|
||
class LeavesCampus { | ||
String campusName; | ||
List<LeavesDepartment> department; | ||
|
||
LeavesCampus({ | ||
this.campusName, | ||
this.department, | ||
}); | ||
|
||
factory LeavesCampus.fromRawJson(String str) => LeavesCampus.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory LeavesCampus.fromJson(Map<String, dynamic> json) => LeavesCampus( | ||
campusName: json["campusName"] == null ? null : json["campusName"], | ||
department: json["department"] == null ? null : List<LeavesDepartment>.from(json["department"].map((x) => LeavesDepartment.fromJson(x))), | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"campusName": campusName == null ? null : campusName, | ||
"department": department == null ? null : List<dynamic>.from(department.map((x) => x.toJson())), | ||
}; | ||
} | ||
|
||
class LeavesDepartment { | ||
String departmentName; | ||
List<LeavesTeacher> teacherList; | ||
|
||
LeavesDepartment({ | ||
this.departmentName, | ||
this.teacherList, | ||
}); | ||
|
||
factory LeavesDepartment.fromRawJson(String str) => LeavesDepartment.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory LeavesDepartment.fromJson(Map<String, dynamic> json) => LeavesDepartment( | ||
departmentName: json["departmentName"] == null ? null : json["departmentName"], | ||
teacherList: json["teacherList"] == null ? null : List<LeavesTeacher>.from(json["teacherList"].map((x) => LeavesTeacher.fromJson(x))), | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"departmentName": departmentName == null ? null : departmentName, | ||
"teacherList": teacherList == null ? null : List<dynamic>.from(teacherList.map((x) => x.toJson())), | ||
}; | ||
} | ||
|
||
class LeavesTeacher { | ||
String teacherName; | ||
String teacherId; | ||
|
||
LeavesTeacher({ | ||
this.teacherName, | ||
this.teacherId, | ||
}); | ||
|
||
factory LeavesTeacher.fromRawJson(String str) => LeavesTeacher.fromJson(json.decode(str)); | ||
|
||
String toRawJson() => json.encode(toJson()); | ||
|
||
factory LeavesTeacher.fromJson(Map<String, dynamic> json) => LeavesTeacher( | ||
teacherName: json["teacherName"] == null ? null : json["teacherName"], | ||
teacherId: json["teacherId"] == null ? null : json["teacherId"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"teacherName": teacherName == null ? null : teacherName, | ||
"teacherId": teacherId == null ? null : teacherId, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.