All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.city.smartb.im.organization.domain.features.command.OrganizationUploadLogoFunction.kt Maven / Gradle / Ivy

There is a newer version: 0.14.2
Show newest version
package city.smartb.im.organization.domain.features.command

import city.smartb.im.organization.domain.model.OrganizationId
import f2.dsl.cqrs.Command
import f2.dsl.cqrs.Event
import f2.dsl.fnc.F2Function
import kotlin.js.JsExport
import kotlin.js.JsName

/**
 * Update the logo of an organization.
 * @d2 function
 * @parent [city.smartb.im.organization.domain.D2OrganizationPage]
 * @order 30
 */
typealias OrganizationUploadLogoFunction = F2Function

@JsExport
@JsName("OrganizationUploadLogoCommandDTO")
interface OrganizationUploadLogoCommandDTO: Command {
    val id: OrganizationId
}

/**
 * @d2 command
 * @parent [OrganizationUploadLogoFunction]
 */
data class OrganizationUploadLogoCommand(
    /**
     * Identifier of the organization.
     */
    override val id: OrganizationId
): OrganizationUploadLogoCommandDTO

@JsExport
@JsName("OrganizationUploadedLogoEventDTO")
interface OrganizationUploadedLogoEventDTO: Event {
    val id: OrganizationId
    val url: String
}

/**
 * @d2 event
 * @parent [OrganizationUploadLogoFunction]
 */
data class OrganizationUploadedLogoEvent(
    /**
     * Identifier of the organization.
     */
    override val id: OrganizationId,

    /**
     * Public URL of the newly uploaded logo
     */
    override val url: String
): OrganizationUploadedLogoEventDTO




© 2015 - 2024 Weber Informatics LLC | Privacy Policy