// Path: src/main/java/no/gorman/database/ColumnType.java
// public enum ColumnType {
// 
//     PrimaryKey,
//     Field,
//     ForeignKey,
//     Version;
// }
// 
// Path: src/main/java/no/gorman/database/Table.java
// public enum Table {
// 
//     daycare,
//     child,
//     grownup_child,
//     grownup,
//     event,
//     event_child,
//     attachment,
//     schedule,
//     club,
//     club_child,
//     club_grownup,
//     event_club;
// 
// }


import java.time.LocalDate;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.toList;
import static no.gorman.database.ColumnType.*;
import static no.gorman.database.Table.*;
    ec_event_id(Long.TYPE, Table.event_child, ForeignKey, Table.event),

    attachment_id(Long.TYPE, Table.attachment, PrimaryKey),
    attachment(byte[].class, Table.attachment),
    thumbnail(byte[].class, Table.attachment),
    attachment_event_id(Long.TYPE, Table.attachment, ForeignKey, Table.event),
    content_type(String.class, Table.attachment, 50),

    schedule_id(Long.TYPE, Table.schedule, PrimaryKey),
    schedule_child_id(Long.TYPE, Table.schedule, ForeignKey, Table.child),
    last_event(Long.TYPE, Table.schedule),
    interval(Integer.TYPE,  Table.schedule),
    schedule_name(String.class, Table.schedule),

    club_id(Long.TYPE, Table.club, PrimaryKey),
    club_name(String.class, Table.club),
    club_color(String.class, Table.club),
    club_daycare_id(Long.TYPE, Table.club, ForeignKey, daycare),

    grc_child_id(Long.TYPE, Table.club_child, ForeignKey, child),
    grc_club_id(Long.TYPE, Table.club_child, ForeignKey, club),

    grg_grownup_id(Long.TYPE, Table.club_grownup, ForeignKey, grownup),
    grg_club_id(Long.TYPE, Table.club_grownup, ForeignKey, club),

    ecl_club_id(Long.TYPE, Table.event_club, ForeignKey, club),
    ecl_event_id(Long.TYPE, Table.event_club, ForeignKey, Table.event);
	
    private final Table table;
    private final Table joinedTo;
// Path: src/main/java/no/gorman/database/ColumnType.java
// public enum ColumnType {
// 
//     PrimaryKey,
//     Field,
//     ForeignKey,
//     Version;
// }
// 
// Path: src/main/java/no/gorman/database/Table.java
// public enum Table {
// 
//     daycare,
//     child,
//     grownup_child,
//     grownup,
//     event,
//     event_child,
//     attachment,
//     schedule,
//     club,
//     club_child,
//     club_grownup,
//     event_club;
// 
// }


// Path: src/main/java/no/gorman/database/DatabaseColumns.java
import java.time.LocalDate;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.toList;
import static no.gorman.database.ColumnType.*;
import static no.gorman.database.Table.*;

    ec_event_id(Long.TYPE, Table.event_child, ForeignKey, Table.event),

    attachment_id(Long.TYPE, Table.attachment, PrimaryKey),
    attachment(byte[].class, Table.attachment),
    thumbnail(byte[].class, Table.attachment),
    attachment_event_id(Long.TYPE, Table.attachment, ForeignKey, Table.event),
    content_type(String.class, Table.attachment, 50),

    schedule_id(Long.TYPE, Table.schedule, PrimaryKey),
    schedule_child_id(Long.TYPE, Table.schedule, ForeignKey, Table.child),
    last_event(Long.TYPE, Table.schedule),
    interval(Integer.TYPE,  Table.schedule),
    schedule_name(String.class, Table.schedule),

    club_id(Long.TYPE, Table.club, PrimaryKey),
    club_name(String.class, Table.club),
    club_color(String.class, Table.club),
    club_daycare_id(Long.TYPE, Table.club, ForeignKey, daycare),

    grc_child_id(Long.TYPE, Table.club_child, ForeignKey, child),
    grc_club_id(Long.TYPE, Table.club_child, ForeignKey, club),

    grg_grownup_id(Long.TYPE, Table.club_grownup, ForeignKey, grownup),
    grg_club_id(Long.TYPE, Table.club_grownup, ForeignKey, club),

    ecl_club_id(Long.TYPE, Table.event_club, ForeignKey, club),
    ecl_event_id(Long.TYPE, Table.event_club, ForeignKey, Table.event);
	
    private final Table table;
    private final Table joinedTo;
    private final ColumnType type;