package com.persagy.meiku.models.entities

import com.persagy.service.models.SBaseEntity
import com.persagy.service.models.annotations.SCascade
import io.swagger.v3.oas.annotations.media.Schema
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 图库-美库
 * @author  wx
 * @date  2020/9/21 10:45
 */
@Schema(description = "锚点")
@Table(name = "labsl_meiku.meiku")
class MeiKu : Serializable, SBaseEntity() {

    /** 图id */
    @Schema(description = "图id")
    @Id
    @Column(name = "id")
    var id: String? = null

    /** 分类 */
    @Schema(description = "分类")
    @Column(name = "category")
    var category: String? = null

    /** 品牌 */
    @Schema(description = "品牌")
    @Column(name = "brand")
    var brand: String? = null

    /** 型号 */
    @Schema(description = "型号")
    @Column(name = "specification")
    var specification: String? = null

    /** 锚点列表 */
    @Schema(description = "锚点列表")
    @SCascade(table="labsl_meiku.meiku_anchor", idColumn="meiku_id", childIdColumn="id")
    var anchorList: ArrayList<MeiKuAnchor>? = null

    @Schema(description = "状态")
    @SCascade(table="labsl_meiku.meiku_state", idColumn="meiku_id", childIdColumn="id")
    var state: ArrayList<MeiKuState>? = null

} // Class MeiKu