例如,我在postgres中创建表vacations
:
create table if not exists vacations (
person text primary key,
vacations tstzmultirange not null
)
在Scala方面,我有:
case class Interval(start: Instant, end: Instant)
case class PersonalLeaves(person: String, onLeave: Seq[Interval])