refactor: Projektstruktur in app/ und backend/ aufgeteilt
This commit is contained in:
48
app/lib/entities/chat_message_entity.dart
Normal file
48
app/lib/entities/chat_message_entity.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
import 'package:objectbox/objectbox.dart';
|
||||
|
||||
@Entity()
|
||||
class ChatMessageEntity {
|
||||
@Id()
|
||||
int id = 0;
|
||||
|
||||
@Unique()
|
||||
String messageId;
|
||||
|
||||
@Index()
|
||||
String conversationKey;
|
||||
|
||||
String content;
|
||||
|
||||
String contentType; // 'TEXT' or 'IMAGE'
|
||||
|
||||
@Property(type: PropertyType.date)
|
||||
@Index()
|
||||
DateTime createdAt;
|
||||
|
||||
String origin; // 'INCOMING' or 'OUTGOING'
|
||||
|
||||
String messageType; // 'NORMAL', 'JOB_ASSIGNMENT', etc.
|
||||
|
||||
String? jobId;
|
||||
|
||||
String? jobNumber;
|
||||
|
||||
bool read;
|
||||
|
||||
bool pendingSync;
|
||||
|
||||
ChatMessageEntity({
|
||||
required this.messageId,
|
||||
required this.conversationKey,
|
||||
required this.content,
|
||||
this.contentType = 'TEXT',
|
||||
required this.createdAt,
|
||||
required this.origin,
|
||||
required this.messageType,
|
||||
this.jobId,
|
||||
this.jobNumber,
|
||||
this.read = false,
|
||||
this.pendingSync = false,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user