ProjectsService

class ProjectsService(db: DatabaseMysql)

Constructors

Link copied to clipboard
fun ProjectsService(db: DatabaseMysql)

Functions

Link copied to clipboard
suspend fun countPublic(): Long

Get count models

Link copied to clipboard
suspend fun getAll(connectKey: String): List<Project>

Get all models

Link copied to clipboard
suspend fun getAllPublic(connectKey: String): List<Project>

Get all public models

Link copied to clipboard
suspend fun getById(connectKey: String, id: Int): Project?

Get model by id

Link copied to clipboard
suspend fun getByIdPublic(connectKey: String, id: Int): Project?

Get public model by id

Link copied to clipboard
suspend fun insert(    title: String?,     description: String?,     titleRu: String?,     descriptionRu: String?,     category: ProjectCategory?,     publicImage: String?,     url: String?,     urlGitHub: String?,     urlSnapcraft: String?,     urlDownload: String?,     urlYouTube: String?,     isPublished: Boolean?,     uploads: List<Int>): Project

Add model Article

Link copied to clipboard
suspend fun update(    id: Int,     title: String?,     description: String?,     titleRu: String?,     descriptionRu: String?,     category: ProjectCategory?,     publicImage: String?,     url: String?,     urlGitHub: String?,     urlSnapcraft: String?,     urlDownload: String?,     urlYouTube: String?,     isPublished: Boolean?,     uploads: List<Int>): Project

Update model Article