| 1 | class Persona { |
| 2 | final String id; |
| 3 | final String name; |
| 4 | final String emoji; |
| 5 | final String systemPrompt; |
| 6 | final String? description; |
| 7 | final bool isBuiltIn; |
| 8 | final DateTime createdAt; |
| 9 | final DateTime updatedAt; |
| 10 | final String? category; |
| 11 | final Map<String, dynamic>? preferredParams; |
| 12 | |
| 13 | Persona({ |
| 14 | required this.id, |
| 15 | required this.name, |
| 16 | required this.emoji, |
| 17 | required this.systemPrompt, |
| 18 | this.description, |
| 19 | this.isBuiltIn = false, |
| 20 | required this.createdAt, |
| 21 | required this.updatedAt, |
| 22 | this.category, |
| 23 | this.preferredParams, |
| 24 | }); |
| 25 | |
| 26 | Persona copyWith({ |
| 27 | String? id, |
| 28 | String? name, |
| 29 | String? emoji, |
| 30 | String? systemPrompt, |
| 31 | String? description, |
| 32 | bool? isBuiltIn, |
| 33 | DateTime? createdAt, |
| 34 | DateTime? updatedAt, |
| 35 | String? category, |
| 36 | Map<String, dynamic>? preferredParams, |
| 37 | }) { |
| 38 | return Persona( |
| 39 | id: id ?? this.id, |
| 40 | name: name ?? this.name, |
| 41 | emoji: emoji ?? this.emoji, |
| 42 | systemPrompt: systemPrompt ?? this.systemPrompt, |
| 43 | description: description ?? this.description, |
| 44 | isBuiltIn: isBuiltIn ?? this.isBuiltIn, |
| 45 | createdAt: createdAt ?? this.createdAt, |
| 46 | updatedAt: updatedAt ?? this.updatedAt, |
| 47 | category: category ?? this.category, |
| 48 | preferredParams: preferredParams ?? this.preferredParams, |
| 49 | ); |
| 50 | } |
| 51 | } |