Add mantra models
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30300
|
||||
*/
|
||||
@Entity
|
||||
data class MantraArtifact(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val publicKey: String,
|
||||
val url: String, // Hash this to get the dTag...
|
||||
val visibility: String, // public, private, permissioned (public, but only members can contribute)
|
||||
val dialectId: String,
|
||||
val copyrightOwner: String,
|
||||
val license: String,
|
||||
// val artifactApprovalId: String,
|
||||
|
||||
)
|
||||
@@ -0,0 +1,21 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30301
|
||||
*/
|
||||
@Entity
|
||||
data class MantraArtifactVersion(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val artifactId: HexKey,
|
||||
val publicKey: HexKey,
|
||||
|
||||
/**
|
||||
* Version Tag...
|
||||
*/
|
||||
val versionLabel: String,
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30302
|
||||
*/
|
||||
@Entity
|
||||
data class MantraChapter(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val artifactVersionId: HexKey,
|
||||
val publicKey: HexKey,
|
||||
val name: String,
|
||||
val originalText: String,
|
||||
val index: Int,
|
||||
val wordCount: Int,
|
||||
val characterCount: Int,
|
||||
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30303
|
||||
*/
|
||||
@Entity
|
||||
data class MantraChunk(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val chapterId: HexKey,
|
||||
val publicKey: HexKey,
|
||||
val text: String,
|
||||
val index: Int,
|
||||
val wordCount: Int,
|
||||
val characterCount: Int
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30304
|
||||
*/
|
||||
@Entity
|
||||
data class MantraDialect(
|
||||
@PrimaryKey
|
||||
val id: HexKey
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30305
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslation(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val publicKey: HexKey,
|
||||
val translationChunkId: HexKey,
|
||||
val translationArtifactVersionId: HexKey,
|
||||
val text: String,
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30306
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationArtifactVersion(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val artifactVersionId: HexKey,
|
||||
val dialectId: HexKey,
|
||||
val name: String,
|
||||
val visibility: String,
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30307
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationArtifactVersionEditor(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val translationArtifactVersionId: HexKey,
|
||||
val editorPublicKey: HexKey,
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30308
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationChapter(
|
||||
val id: HexKey,
|
||||
val chapterId: HexKey,
|
||||
val translationArtifactVersionId: HexKey,
|
||||
val index: Int
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30309
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationChapterProofReader(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val translationChapterId: HexKey,
|
||||
val proofReaderPublicKey: HexKey,
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30310
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationChapterTranslator(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val translationChapterId: HexKey,
|
||||
val translatorPublicKey: HexKey,
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30311
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationChunk(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val text: String,
|
||||
val index: Int,
|
||||
val chunkId: HexKey,
|
||||
val translationChapterId: HexKey,
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
package press.mantra.compose.database.model
|
||||
|
||||
import androidx.room3.Entity
|
||||
import androidx.room3.PrimaryKey
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
/**
|
||||
* 30313
|
||||
*/
|
||||
@Entity
|
||||
data class MantraTranslationTranslator(
|
||||
@PrimaryKey
|
||||
val id: HexKey,
|
||||
val translationId: HexKey,
|
||||
val translatorPublicKey: HexKey,
|
||||
val content: String,
|
||||
)
|
||||
Reference in New Issue
Block a user