import 'package:json_annotation/json_annotation.dart';

import 'data.dart';
part 'course_model.g.dart';
@JsonSerializable()
class CourseModel {
  Data? data;
  Mess? mess;

  CourseModel({this.data, this.mess});

  factory CourseModel.fromJson(Map<String, dynamic> json) => _$CourseModelFromJson(json);

  Map<String, dynamic> toJson() => _$CourseModelToJson(this);
}

class Teachers {
  String? courseUserId;
  String? courseId;
  String? username;
  String? fullName;
  String? role;
  String? startdate;
  String? enddate;
  String? stageAddress;
  String? teacherIncomeType;
  bool? freeTuition;
  String? createDate;
  String? createUser;
  String? updateDate;
  double? incomeByPercent;
  String? updateUser;
  int? incomeByCourseDay;

  Teachers(
      {this.courseUserId,
        this.courseId,
        this.username,
        this.fullName,
        this.role,
        this.startdate,
        this.enddate,
        this.stageAddress,
        this.teacherIncomeType,
        this.freeTuition,
        this.createDate,
        this.createUser,
        this.updateDate,
        this.incomeByPercent,
        this.updateUser,
        this.incomeByCourseDay});

  Teachers.fromJson(Map<String, dynamic> json) {
    courseUserId = json['courseUserId'];
    courseId = json['courseId'];
    username = json['username'];
    fullName = json['fullName'];
    role = json['role'];
    startdate = json['startdate'];
    enddate = json['enddate'];
    stageAddress = json['stageAddress'];
    teacherIncomeType = json['teacherIncomeType'];
    freeTuition = json['freeTuition'];
    createDate = json['createDate'];
    createUser = json['createUser'];
    updateDate = json['updateDate'];
    incomeByPercent = json['incomeByPercent'];
    updateUser = json['updateUser'];
    incomeByCourseDay = json['incomeByCourseDay'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['courseUserId'] = this.courseUserId;
    data['courseId'] = this.courseId;
    data['username'] = this.username;
    data['fullName'] = this.fullName;
    data['role'] = this.role;
    data['startdate'] = this.startdate;
    data['enddate'] = this.enddate;
    data['stageAddress'] = this.stageAddress;
    data['teacherIncomeType'] = this.teacherIncomeType;
    data['freeTuition'] = this.freeTuition;
    data['createDate'] = this.createDate;
    data['createUser'] = this.createUser;
    data['updateDate'] = this.updateDate;
    data['incomeByPercent'] = this.incomeByPercent;
    data['updateUser'] = this.updateUser;
    data['incomeByCourseDay'] = this.incomeByCourseDay;
    return data;
  }
}

class Mess {
  int? code;
  String? description;

  Mess({this.code, this.description});

  Mess.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    description = json['description'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['description'] = this.description;
    return data;
  }
}

