first entity
This commit is contained in:
19
lib/database/base_entity.dart
Normal file
19
lib/database/base_entity.dart
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
abstract class BaseEntity{
|
||||||
|
static String id = 'id';
|
||||||
|
static String title = 'Title';
|
||||||
|
static String creationDate = 'CreationDate';
|
||||||
|
static String lastEditDate = 'LastEditDate';
|
||||||
|
|
||||||
|
static String get getId{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
static String get getTitle{
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
static String get getCreationDate{
|
||||||
|
return creationDate;
|
||||||
|
}
|
||||||
|
static String get getLastEditDate{
|
||||||
|
return lastEditDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
14
lib/database/identifiers/enum/color.dart
Normal file
14
lib/database/identifiers/enum/color.dart
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
enum Color {
|
||||||
|
none,
|
||||||
|
red,
|
||||||
|
orange,
|
||||||
|
yellow,
|
||||||
|
green,
|
||||||
|
blue,
|
||||||
|
purple,
|
||||||
|
pink,
|
||||||
|
brown,
|
||||||
|
grey,
|
||||||
|
black,
|
||||||
|
white,
|
||||||
|
}
|
||||||
7
lib/database/identifiers/enum/priority.dart
Normal file
7
lib/database/identifiers/enum/priority.dart
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
enum Priority{
|
||||||
|
none,
|
||||||
|
low,
|
||||||
|
medium,
|
||||||
|
moderate,
|
||||||
|
high
|
||||||
|
}
|
||||||
6
lib/database/identifiers/tag.dart
Normal file
6
lib/database/identifiers/tag.dart
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import 'enum/color.dart';
|
||||||
|
|
||||||
|
class Tag {
|
||||||
|
static String title = "";
|
||||||
|
Color color = Color.none;
|
||||||
|
}
|
||||||
8
lib/database/note.dart
Normal file
8
lib/database/note.dart
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import 'base_entity.dart';
|
||||||
|
|
||||||
|
class Note extends BaseEntity{
|
||||||
|
static String id = BaseEntity.getId;
|
||||||
|
static String Title = BaseEntity.getTitle;
|
||||||
|
static String CreationDate = BaseEntity.getCreationDate;
|
||||||
|
|
||||||
|
}
|
||||||
11
lib/database/promemoria.dart
Normal file
11
lib/database/promemoria.dart
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import 'base_entity.dart';
|
||||||
|
import 'identifiers/enum/priority.dart';
|
||||||
|
|
||||||
|
class Note extends BaseEntity{
|
||||||
|
static String id = BaseEntity.getId;
|
||||||
|
static String title = BaseEntity.getTitle;
|
||||||
|
static String creationDate = BaseEntity.getCreationDate;
|
||||||
|
static String expirationDate = 'expirationDate';
|
||||||
|
Priority priority = Priority.low;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user