```@Entity class Region() { constructor(coord...
# spring
g
Copy code
@Entity
class Region() {

    constructor(coordinator: Coordinator,
                storeLocation: StockLocation,
                teacherTrainers: Set<TeacherTrainer>,
                schools: Set<School>,
                events: Set<TrainingEvent>) : this(){
        this.coordinator = coordinator
        this.storeLocation = storeLocation
//        this.teacherTrainers = teacherTrainers
        this.schools = schools
        this.events = events
    }

    @OneToOne
    lateinit var coordinator: Coordinator

    @OneToOne
    lateinit var storeLocation: StockLocation

    @OneToMany
    lateinit var schools: Set<School>

    @OneToMany(targetEntity = TeacherTrainer::class)
    lateinit var teacherTrainers: Set<TeacherTrainer>

    @OneToMany
    lateinit var events: Set<TrainingEvent>

    @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
    val id: Int? = null
}