package de.thpeetz.kontor.comics

import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
import javax.persistence.ManyToOne


@Entity
class Artist(
    val name: String,
    @Id @GeneratedValue val id: Long? = null
)

@Entity
class Publisher(
    val name: String,
    @Id @GeneratedValue val id: Long? = null
)

@Entity
class Comic(
    val title: String,
    @ManyToOne val publisher: Publisher,
    val currentOrder: Boolean,
    val completed: Boolean,
    @Id @GeneratedValue val id: Long? = null
)

@Entity
class Issue(
    val number: String,
    @ManyToOne val comic: Comic,
    val gelesen: Boolean,
    @Id @GeneratedValue val id: Long? = null
)