toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'attributes': [for (final m in attributes) m.toJson()],
'defaults': defaults.toJson(),
'active': active,
'variants': [for (final v in variants) v.toJson()],
'createdAt': createdAt,
'updatedAt': updatedAt,
};