Skip to content

Commit 6942576

Browse files
committed
finalize
1 parent 6e476e8 commit 6942576

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Spawn-App-iOS-SwiftUI/Models/DTOs/Event/EventCreationDTO.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class EventCreationDTO: Identifiable, Codable {
2222
It's rendered directly in the UI and stored as a single UTF-8 string in the database. */
2323
var icon: String?
2424
var category: EventCategory = .general
25+
var createdAt: Date?
2526

2627
// MARK: Relations
2728
var creatorUserId: UUID
@@ -37,7 +38,8 @@ class EventCreationDTO: Identifiable, Codable {
3738
icon: String? = nil,
3839
category: EventCategory = .general,
3940
creatorUserId: UUID,
40-
invitedFriendUserIds: [UUID]? = nil
41+
invitedFriendUserIds: [UUID]? = nil,
42+
createdAt: Date? = nil
4143
) {
4244
self.id = id
4345
self.title = title
@@ -49,5 +51,6 @@ class EventCreationDTO: Identifiable, Codable {
4951
self.category = category
5052
self.creatorUserId = creatorUserId
5153
self.invitedFriendUserIds = invitedFriendUserIds
54+
self.createdAt = createdAt
5255
}
5356
}

Spawn-App-iOS-SwiftUI/Models/DTOs/Event/FullFeedEventDTO.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class FullFeedEventDTO: Identifiable, Codable, Equatable {
2727
It's rendered directly in the UI and stored as a single UTF-8 string in the database. */
2828
var icon: String?
2929
var category: EventCategory = .general
30+
var createdAt: Date?
3031

3132
// MARK: Relations
3233
var creatorUser: BaseUserDTO
@@ -52,7 +53,8 @@ class FullFeedEventDTO: Identifiable, Codable, Equatable {
5253
invitedUsers: [BaseUserDTO]? = nil,
5354
chatMessages: [FullEventChatMessageDTO]? = nil,
5455
participationStatus: ParticipationStatus? = nil,
55-
isSelfOwned: Bool? = nil
56+
isSelfOwned: Bool? = nil,
57+
createdAt: Date? = nil
5658
) {
5759
self.id = id
5860
self.title = title
@@ -68,6 +70,7 @@ class FullFeedEventDTO: Identifiable, Codable, Equatable {
6870
self.chatMessages = chatMessages
6971
self.participationStatus = participationStatus
7072
self.isSelfOwned = isSelfOwned
73+
self.createdAt = createdAt
7174
}
7275
}
7376

Spawn-App-iOS-SwiftUI/Models/DTOs/Event/ProfileEventDTO.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class ProfileEventDTO: FullFeedEventDTO {
2626
chatMessages: [FullEventChatMessageDTO]? = nil,
2727
participationStatus: ParticipationStatus? = nil,
2828
isSelfOwned: Bool? = nil,
29-
isPastEvent: Bool = false
29+
isPastEvent: Bool = false,
30+
createdAt: Date? = nil
3031
) {
3132
self.isPastEvent = isPastEvent
3233

@@ -44,7 +45,8 @@ class ProfileEventDTO: FullFeedEventDTO {
4445
invitedUsers: invitedUsers,
4546
chatMessages: chatMessages,
4647
participationStatus: participationStatus,
47-
isSelfOwned: isSelfOwned
48+
isSelfOwned: isSelfOwned,
49+
createdAt: createdAt
4850
)
4951
}
5052

@@ -84,7 +86,8 @@ class ProfileEventDTO: FullFeedEventDTO {
8486
chatMessages: fullFeedEventDTO.chatMessages,
8587
participationStatus: fullFeedEventDTO.participationStatus,
8688
isSelfOwned: fullFeedEventDTO.isSelfOwned,
87-
isPastEvent: isPastEvent
89+
isPastEvent: isPastEvent,
90+
createdAt: fullFeedEventDTO.createdAt
8891
)
8992
}
9093
}

0 commit comments

Comments
 (0)