import 'package:equatable/equatable.dart';

class Tag extends Equatable {
  final String uuid;
  final String name;
  final String createdAt;
  final String updatedAt;

  const Tag({
    required this.uuid,
    required this.name,
    required this.createdAt,
    required this.updatedAt,
  });

  factory Tag.fromJson(Map<String, dynamic> json) {
    return Tag(
      uuid: json['uuid'] as String,
      name: json['name'] as String,
      createdAt: json['createdAt'] as String,
      updatedAt: json['updatedAt'] as String,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'uuid': uuid,
      'name': name,
      'createdAt': createdAt,
      'updatedAt': updatedAt,
    };
  }

  @override
  List<Object?> get props => [uuid, name, createdAt, updatedAt];
}
