first commit
This commit is contained in:
18
lib/model/booth.dart
Normal file
18
lib/model/booth.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class Booth extends Equatable {
|
||||
int id;
|
||||
String name;
|
||||
String code;
|
||||
|
||||
Booth({required this.name, required this.id, required this.code});
|
||||
Booth.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'].runtimeType == int ? json['id'] : int.parse(json['id']),
|
||||
name = json['name'],
|
||||
code = json['code'];
|
||||
|
||||
Map<String, dynamic> toJson() => {'name': name, 'id': id, 'code': code};
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
Reference in New Issue
Block a user