import 'package:boilerplate/domain/entities/categories/intellectual_type_data.dart';
import 'package:json_annotation/json_annotation.dart';

part 'get_intellectual_type_res_model.g.dart';

@JsonSerializable()
class GetIntellectualTypesResModel {
  final List<GetIntellectualTypeItemResModel> result;

  GetIntellectualTypesResModel(this.result);

  factory GetIntellectualTypesResModel.fromJson(json) =>
      _$GetIntellectualTypesResModelFromJson(json);

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

@JsonSerializable()
class GetIntellectualTypeItemResModel extends IntellectualTypeData {
  GetIntellectualTypeItemResModel(
    super.id,
    super.code,
    super.name,
    super.detail,
    super.value,
    super.link,
    super.target,
    super.icon,
    super.image,
    super.className,
    super.level,
    super.group,
    super.category,
    super.scope,
    super.status,
    super.refSubId,
    super.refMainId,
    super.createdAt,
    super.updatedAt,
    super.tbName,
    super.tbId,
  );

  factory GetIntellectualTypeItemResModel.fromJson(json) =>
      _$GetIntellectualTypeItemResModelFromJson(json);

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