ArticlesService

class ArticlesService(db: DatabaseMysql)

Constructors

Link copied to clipboard
fun ArticlesService(db: DatabaseMysql)

Functions

Link copied to clipboard
suspend fun countPublic(): Long

Get count models

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

Get all models

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

Get all public models

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

Get model by id

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

Get public model by id

Link copied to clipboard
suspend fun insert(    title: String?,     description: String?,     content: String?,     titleRu: String?,     descriptionRu: String?,     contentRu: String?,     category: ArticleCategory?,     type: ArticleType?,     url: String?,     listImage: String?,     viewImage: String?,     isPublished: Boolean?,     uploads: List<Int>): Article

Add model Article

Link copied to clipboard
suspend fun update(    id: Int,     title: String?,     description: String?,     content: String?,     titleRu: String?,     descriptionRu: String?,     contentRu: String?,     category: ArticleCategory?,     type: ArticleType?,     url: String?,     listImage: String?,     viewImage: String?,     isPublished: Boolean?,     uploads: List<Int>): Article

Update model Article