Hildebrandt Tobias
09/06/2023, 10:43 AMCREATE TABLE tts_schedule (
scheduleId INT NOT NULL PRIMARY KEY,
companyId VARCHAR(160) NOT NULL
);
Then I have to write a representation:
object ScheduleTable : Table("tts_schedule") {
val scheduleId = integer("scheduleId")
val companyId = varchar("companyId", 160)
override val primaryKey = PrimaryKey(scheduleId)
}
Then the insert, update, delete and get transactions.
And then a ResultsRow
extension function to map the result values to a DTO.
Is there a better way?Ruben Holen
09/06/2023, 12:04 PMobject ScheduleTable : IntIdTable("tts_schedule", "scheduleId") {
val companyId = varchar("companyId", 160)
}
class Schedule(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<Schedule>(ScheduleTable)
val companyId by ScheduleTable.companyId
}
Ruben Holen
09/06/2023, 12:06 PMSchemaUtils.createMissingTablesAndColumns()
if you don't want to write the sql by handHildebrandt Tobias
09/06/2023, 12:26 PM