feat(knowledge): add noteType field to Note model, api, repository, provider
This commit is contained in:
@@ -3,6 +3,7 @@ class Note {
|
||||
final String title;
|
||||
final String body;
|
||||
final List<String> tags;
|
||||
final String noteType;
|
||||
final int? projectId;
|
||||
final int? milestoneId;
|
||||
final DateTime createdAt;
|
||||
@@ -13,6 +14,7 @@ class Note {
|
||||
required this.title,
|
||||
required this.body,
|
||||
required this.tags,
|
||||
this.noteType = 'note',
|
||||
this.projectId,
|
||||
this.milestoneId,
|
||||
required this.createdAt,
|
||||
@@ -27,6 +29,7 @@ class Note {
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
[],
|
||||
noteType: json['note_type'] as String? ?? 'note',
|
||||
projectId: json['project_id'] as int?,
|
||||
milestoneId: json['milestone_id'] as int?,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
@@ -37,6 +40,7 @@ class Note {
|
||||
'title': title,
|
||||
'body': body,
|
||||
'tags': tags,
|
||||
'note_type': noteType,
|
||||
'project_id': projectId,
|
||||
'milestone_id': milestoneId,
|
||||
};
|
||||
@@ -45,6 +49,7 @@ class Note {
|
||||
String? title,
|
||||
String? body,
|
||||
List<String>? tags,
|
||||
String? noteType,
|
||||
Object? projectId = _undefined,
|
||||
Object? milestoneId = _undefined,
|
||||
}) =>
|
||||
@@ -53,6 +58,7 @@ class Note {
|
||||
title: title ?? this.title,
|
||||
body: body ?? this.body,
|
||||
tags: tags ?? this.tags,
|
||||
noteType: noteType ?? this.noteType,
|
||||
projectId: identical(projectId, _undefined)
|
||||
? this.projectId
|
||||
: projectId as int?,
|
||||
|
||||
Reference in New Issue
Block a user