VideosService

class VideosService(db: DatabaseMysql)

Constructors

Link copied to clipboard
fun VideosService(db: DatabaseMysql)

Functions

Link copied to clipboard
suspend fun countPublic(): Long

Get count models

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

Get all models

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

Get all public models

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

Get model by id

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

Get public model by id

Link copied to clipboard
suspend fun insert(    title: String?,     description: String?,     titleRu: String?,     descriptionRu: String?,     image: String?,     url: String?,     isPublished: Boolean?,     uploads: List<Int>): Video

Add model Video

Link copied to clipboard
suspend fun update(    id: Int,     title: String?,     description: String?,     titleRu: String?,     descriptionRu: String?,     image: String?,     url: String?,     isPublished: Boolean?,     uploads: List<Int>): Video

Update model Video