feat: tools implementation

This commit is contained in:
cogwheel0
2025-08-19 20:26:19 +05:30
parent d3742944bc
commit 267a45cd9e
8 changed files with 189 additions and 14 deletions

26
lib/core/models/tool.dart Normal file
View File

@@ -0,0 +1,26 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'tool.freezed.dart';
@freezed
sealed class Tool with _$Tool {
const Tool._();
const factory Tool({
required String id,
required String name,
String? description,
String? userId,
Map<String, dynamic>? meta,
}) = _Tool;
factory Tool.fromJson(Map<String, dynamic> json) {
return Tool(
id: json['id'] as String,
name: json['name'] as String,
description: json['description'] as String?,
userId: json['user_id'] as String?,
meta: json['meta'] as Map<String, dynamic>?,
);
}
}