mirror of https://github.com/usbharu/Hideout.git
feat: Timelineの構築に必要なものを追加
This commit is contained in:
parent
c0f03560d5
commit
6188463a68
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.followtimeline
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.core.domain.model.timeline.TimelineId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId
|
||||||
|
|
||||||
|
class FollowTimeline(val userDetailId: UserDetailId, val timelineId: TimelineId)
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.followtimeline
|
||||||
|
|
||||||
|
interface FollowTimelineRepository {
|
||||||
|
suspend fun save(followTimeline: FollowTimeline): FollowTimeline
|
||||||
|
suspend fun delete(followTimeline: FollowTimeline)
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timeline
|
||||||
|
|
||||||
|
class Timeline(val id: TimelineId, val name: TimelineName, val visibility: TimelineVisibility, val isSystem: Boolean)
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timeline
|
||||||
|
|
||||||
|
class TimelineId {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timeline
|
||||||
|
|
||||||
|
class TimelineName {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timeline
|
||||||
|
|
||||||
|
interface TimelineRepository {
|
||||||
|
suspend fun save(timeline: Timeline): Timeline
|
||||||
|
suspend fun delete(timeline: Timeline)
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timeline
|
||||||
|
|
||||||
|
enum class TimelineVisibility {
|
||||||
|
PRIVATE,
|
||||||
|
UNLISTED,
|
||||||
|
PUBLIC
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinebuilder
|
||||||
|
|
||||||
|
class TimelineBuilder(val id: TimelineBuilderId, val timelineBuilderName: TimelineBuilderName) {
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinebuilder
|
||||||
|
|
||||||
|
class TimelineBuilderId {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinebuilder
|
||||||
|
|
||||||
|
@JvmInline
|
||||||
|
value class TimelineBuilderName(val value: String)
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinebuilder
|
||||||
|
|
||||||
|
interface TimelineBuilderRepository {
|
||||||
|
suspend fun save(timelineBuilder: TimelineBuilder): TimelineBuilder
|
||||||
|
suspend fun delete(timelineBuilder: TimelineBuilder)
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelineobject
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.core.domain.model.actor.ActorId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.emoji.EmojiId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.media.MediaId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.post.PostId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.post.Visibility
|
||||||
|
import dev.usbharu.hideout.core.domain.model.timeline.TimelineId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.userdetails.UserDetailId
|
||||||
|
import java.time.Instant
|
||||||
|
|
||||||
|
class TimelineObject(
|
||||||
|
val id: TimelineObjectId,
|
||||||
|
val userDetailId: UserDetailId,
|
||||||
|
val timelineId: TimelineId,
|
||||||
|
val postId: PostId,
|
||||||
|
val postActorId: ActorId,
|
||||||
|
val postCreatedAt: Instant,
|
||||||
|
val replyId: PostId?,
|
||||||
|
val repostId: PostId?,
|
||||||
|
val visibility: Visibility,
|
||||||
|
val isPureRepost: Boolean,
|
||||||
|
val mediaIds: List<MediaId>,
|
||||||
|
val emojiIds: List<EmojiId>,
|
||||||
|
val visibleActors: List<ActorId>,
|
||||||
|
val hasMedia: Boolean,
|
||||||
|
val hasMediaInRepost: Boolean,
|
||||||
|
val lastUpdatedAt: Instant,
|
||||||
|
val warnFilters: List<TimelineObjectWarnFilter>
|
||||||
|
) {
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelineobject
|
||||||
|
|
||||||
|
@JvmInline
|
||||||
|
value class TimelineObjectId(val value: Long)
|
|
@ -0,0 +1,7 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelineobject
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.core.domain.model.filter.FilterId
|
||||||
|
|
||||||
|
class TimelineObjectWarnFilter(val filterId: FilterId, val matchedKeyword: String) {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinerelationship
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.core.domain.model.actor.ActorId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.instance.InstanceId
|
||||||
|
|
||||||
|
class TimelineRelationship(
|
||||||
|
val timelineRelationshipId: TimelineRelationshipId,
|
||||||
|
val actorId: ActorId?,
|
||||||
|
val instanceId: InstanceId?
|
||||||
|
)
|
|
@ -0,0 +1,4 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinerelationship
|
||||||
|
|
||||||
|
@JvmInline
|
||||||
|
value class TimelineRelationshipId(val value: Long)
|
|
@ -0,0 +1,6 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.timelinerelationship
|
||||||
|
|
||||||
|
interface TimelineRelationshipRepository {
|
||||||
|
suspend fun save(timelineRelationship: TimelineRelationship): TimelineRelationship
|
||||||
|
suspend fun delete(timelineRelationship: TimelineRelationship)
|
||||||
|
}
|
Loading…
Reference in New Issue