class School {
  final int id;
  final String name;
  final String? logo;
  final String? addressFull;

  const School({
    required this.id,
    required this.name,
    this.logo,
    this.addressFull,
  });

  factory School.fromJson(Map<String, dynamic> j) {
    return School(
      id: (j['id'] as num).toInt(),
      name: (j['name'] ?? '').toString(),
      logo: (j['logo'] as String?)?.trim().isEmpty == true ? null : j['logo'],
      addressFull: (j['address_full'] as String?)?.trim().isEmpty == true
          ? null
          : j['address_full'],
    );
  }
}
