first entity

This commit is contained in:
2023-09-27 08:31:00 +02:00
parent 4f4756a605
commit ce16467f1d
6 changed files with 65 additions and 0 deletions

View 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;
}
}

View File

@@ -0,0 +1,14 @@
enum Color {
none,
red,
orange,
yellow,
green,
blue,
purple,
pink,
brown,
grey,
black,
white,
}

View File

@@ -0,0 +1,7 @@
enum Priority{
none,
low,
medium,
moderate,
high
}

View 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
View 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;
}

View 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;
}