import 'package:test_sa/models/base.dart';

class AssetColumnMetadata extends Base {
  String? propertyName;
  String? displayName;

  AssetColumnMetadata({
    this.propertyName,
    this.displayName,
  }) : super(identifier: propertyName, name: displayName);

  factory AssetColumnMetadata.fromJson(Map<String, dynamic> json) {
    return AssetColumnMetadata(
      propertyName: json['propertyName'],
      displayName: json['displayName'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'propertyName': propertyName,
      'displayName': displayName,
    };
  }

  @override
  bool operator ==(Object other) => identical(this, other) || other is AssetColumnMetadata && runtimeType == other.runtimeType && propertyName == other.propertyName;

  @override
  int get hashCode => propertyName.hashCode;
}
