Package com.keygenqt.ps.db.models

Types

Link copied to clipboard
data class Article(    val id: Int? = null,     val title: String,     val description: String,     val content: String,     val titleRu: String?,     val descriptionRu: String?,     val contentRu: String?,     val category: ArticleCategory,     val type: ArticleType,     val url: String,     val listImage: String,     val viewImage: String,     val isPublished: Boolean,     val createAt: Long,     val updateAt: Long,     val uploads: List<Upload>,     val isLike: Boolean)
Link copied to clipboard
enum ArticleCategory : Enum<ArticleCategory>

Category article

Link copied to clipboard
class ArticleEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Articles : IntIdTable
Link copied to clipboard
enum ArticleType : Enum<ArticleType>

Type article

Link copied to clipboard
object ArticleUploads : Table
Link copied to clipboard
data class Connect(    val id: Int? = null,     val email: String,     val isSent: Boolean,     val locale: String,     val createAt: Long,     val updateAt: Long)
Link copied to clipboard
class ConnectEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Connects : IntIdTable
Link copied to clipboard
data class GitHubRepo(    val language: String? = "",     val name: String,     val description: String? = "",     val url: String,     val topics: List<String>? = listOf(),     val stargazersCount: Long,     val gitHubCreateAt: LocalDateTime = Clock.System.now().toLocalDateTime(TimeZone.UTC),     val category: RepoCategory? = null,     val createAt: Long? = null)
Link copied to clipboard
class GitHubRepoEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object GitHubRepos : IntIdTable
Link copied to clipboard
data class GitHubUser(    val publicReposCount: Long,     val followersCount: Long,     val createAt: Long? = null)
Link copied to clipboard
class GitHubUserEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object GitHubUsers : IntIdTable
Link copied to clipboard
data class Like(    val id: Int? = null,     val projectId: Int,     val key: String,     val createAt: Long? = null)
Link copied to clipboard
data class LikeArticle(    val id: Int? = null,     val articleId: Int,     val key: String,     val createAt: Long? = null)
Link copied to clipboard
class LikeArticleEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
class LikeProjectEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object LikesArticle : IntIdTable
Link copied to clipboard
object LikesProject : IntIdTable
Link copied to clipboard
data class Project(    val id: Int? = null,     val title: String,     val description: String,     val titleRu: String?,     val descriptionRu: String?,     val category: ProjectCategory,     val publicImage: String,     val url: String,     val urlGitHub: String,     val urlSnapcraft: String,     val urlDownload: String,     val urlYouTube: String,     val isPublished: Boolean,     val createAt: Long,     val updateAt: Long,     val uploads: List<Upload>,     val isLike: Boolean)
Link copied to clipboard
enum ProjectCategory : Enum<ProjectCategory>

Project category

Link copied to clipboard
class ProjectEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Projects : IntIdTable
Link copied to clipboard
object ProjectUploads : Table
Link copied to clipboard
enum RepoCategory : Enum<RepoCategory>

Project category

Link copied to clipboard
data class Token(    val id: Int? = null,     val userId: Int,     val deviceId: String,     val token: String,     val refreshToken: String,     val expiresAt: Long,     val createAt: Long)
Link copied to clipboard
class TokenEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Tokens : IntIdTable
Link copied to clipboard
data class Upload(    val id: Int? = null,     val fileName: String,     val fileMime: String,     val originalFileName: String,     val createAt: Long? = null,     val isRelationArticle: Boolean? = null,     val isRelationProject: Boolean? = null,     val isRelationVideo: Boolean? = null)
Link copied to clipboard
class UploadEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Uploads : IntIdTable
Link copied to clipboard
data class User(    val id: Int,     val email: String,     val password: String,     val role: UserRole,     val tokens: List<Token>) : Principal
Link copied to clipboard
class UserEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
enum UserRole : Enum<UserRole>

Role uer in app

Link copied to clipboard
object Users : IntIdTable

Table users

Link copied to clipboard
data class Video(    val id: Int? = null,     val title: String,     val description: String,     val titleRu: String?,     val descriptionRu: String?,     val image: String,     val url: String,     val isPublished: Boolean,     val createAt: Long,     val updateAt: Long,     val uploads: List<Upload>)
Link copied to clipboard
class VideoEntity(id: EntityID<Int>) : IntEntity

Exposed entity

Link copied to clipboard
object Videos : IntIdTable
Link copied to clipboard
object VideoUploads : Table

Functions

Link copied to clipboard
fun ArticleEntity.toArticle(): Article

Convert to model

Link copied to clipboard
fun Iterable<ArticleEntity>.toArticles(): List<Article>

Convert list

Link copied to clipboard
fun ConnectEntity.toConnect(): Connect

Convert to model

Link copied to clipboard
fun Iterable<ConnectEntity>.toConnects(): List<Connect>

Convert list

Link copied to clipboard
fun GitHubRepoEntity.toGitHubRepo(): GitHubRepo

Convert to model

Link copied to clipboard
fun Iterable<GitHubRepoEntity>.toGitHubRepos(): List<GitHubRepo>

Convert list

Link copied to clipboard
fun GitHubUserEntity.toGitHubUser(): GitHubUser

Convert to model

Link copied to clipboard
fun Iterable<GitHubUserEntity>.toGitHubUsers(): List<GitHubUser>

Convert list

Link copied to clipboard
fun LikeArticleEntity.toLike(): Like
fun LikeProjectEntity.toLike(): Like

Convert to model

Link copied to clipboard
fun Iterable<LikeArticleEntity>.toLikes(): List<Like>
fun Iterable<LikeProjectEntity>.toLikes(): List<Like>

Convert list

Link copied to clipboard
fun ProjectEntity.toProject(): Project

Convert ProjectEntity to model

Link copied to clipboard
fun Iterable<ProjectEntity>.toProjects(): List<Project>

Convert list

Link copied to clipboard
fun TokenEntity.toToken(): Token

Convert to model

Link copied to clipboard
fun Iterable<TokenEntity>.toTokens(): List<Token>

Convert list

Link copied to clipboard
fun UploadEntity.toUpload(): Upload

Convert to model

Link copied to clipboard
fun Iterable<UploadEntity>.toUploads(): List<Upload>

Convert list

Link copied to clipboard
fun UserEntity.toUser(): User

Convert

Link copied to clipboard
fun Iterable<UserEntity>.toUsers(): List<User>

Convert list

Link copied to clipboard
fun VideoEntity.toVideo(): Video

Convert to model

Link copied to clipboard
fun Iterable<VideoEntity>.toVideos(): List<Video>

Convert list