-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AnnouncementDomain): Add AnnouncementSummaryEntity
- Loading branch information
Showing
7 changed files
with
135 additions
and
25 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
...omain/AnnouncementDomainModule/AnnouncementEntity/Sources/AnnouncementSummaryEntity.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// AnnouncementSummaryEntity.swift | ||
// AnnouncementEntity | ||
// | ||
// Created by DOYEON LEE on 8/18/24. | ||
// | ||
|
||
import Foundation | ||
|
||
/** | ||
Represents a announcement in group(organization). | ||
*/ | ||
public struct AnnouncementSummaryEntity: Identifiable, Equatable { | ||
/// Unique identifier for the announcement item | ||
public let id: Int | ||
|
||
/// ID of organization that will generate announcement | ||
public let organizationId: Int | ||
|
||
/// Announcement creation date | ||
public let createdAt: Date? | ||
|
||
/// Image URL for the announcement illustration. (optional) | ||
public let imageUrl: String? | ||
|
||
/// Title of the announcement | ||
public let title: String | ||
|
||
/// Body text of the announcement | ||
public let body: String | ||
|
||
/// Place of the announcement (optional) | ||
public let placeName: String? | ||
|
||
/// Count of todo items (optional) | ||
public let todoCount: Int? | ||
|
||
public init( | ||
id: Int, | ||
organizationId: Int, | ||
imageUrl: String? = nil, | ||
createdAt: Date? = nil, | ||
title: String, | ||
body: String, | ||
placeName: String? = nil, | ||
todoCount: Int? = nil | ||
) { | ||
self.id = id | ||
self.organizationId = organizationId | ||
self.createdAt = createdAt | ||
self.imageUrl = imageUrl | ||
self.title = title | ||
self.body = body | ||
self.placeName = placeName | ||
self.todoCount = todoCount | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 59 additions & 4 deletions
63
...ase/Sources/GetAnnouncementsByGroup.swift → ...rces/GetAnnouncementsByGroupUsecase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters