import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/student_personal_info.dart';
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';

import 'student_personal_state.dart';

class StudentPersonalLogic extends GetxController with RequestToolMixin {
  final StudentPersonalState state = StudentPersonalState();

  @override
  void onInit() {
    super.onInit();
    state.studentId = Get.arguments['studentId'];
    state.homeworkId = Get.arguments['homeworkId'];
    getInfo();
  }

  void getInfo() async {
    StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId, state.studentId);
    state.studentInfo.value = data;
  }
}
