<commit_before>import * as SequelizeStatic from 'sequelize';
import { EventModel, EventAttribute, EventInstance, EventDto } from './event';
import { ActModel, ActAttribute, ActInstance, ActDto } from './act';
import { BookingStatusModel, BookingStatusAttribute, BookingStatusInstance, BookingStatusDto } from './booking-status';
import { ActApplicationModel, ActApplicationInstance, ActApplicationAttribute, ActApplicationDto } from './act-application';

export function booking(db: SequelizeStatic.Sequelize, BookingStatus: BookingStatusModel, ActApplication: ActApplicationModel)  {    
    let Booking = db.define<BookingInstance, BookingAttribute>('Booking', {
        tech_specs: SequelizeStatic.TEXT,
        size_of_act: SequelizeStatic.NUMBER,
        size_of_party: SequelizeStatic.NUMBER
        // budget
        // advertising priority
    }, {
        schema: 'eventplanner'
    });
    
   // Booking.belongsTo(BookingStatus);

    //Booking.hasOne(ActApplication);
    //ActApplication.belongsTo(Booking);

    // todos

    // sequence of fee records from negotiation
    
    return Booking;    
}

export interface BookingAttribute { 
    id?: number;
    createdAt?: Date;
    updatedAt?: Date;
    tech_specs?: string;
    size_of_act?: number;
    size_of_party?: number;
}

export interface BookingInstance extends SequelizeStatic.Instance<BookingAttribute>, BookingAttribute {    
    event: EventInstance;
    createEvent: SequelizeStatic.BelongsToCreateAssociationMixin<EventAttribute>;
    getEvent: SequelizeStatic.BelongsToGetAssociationMixin<EventInstance>;
    setEvent: SequelizeStatic.BelongsToSetAssociationMixin<EventInstance, number>;

    act: ActInstance;
    createAct: SequelizeStatic.BelongsToCreateAssociationMixin<ActAttribute>;
    getAct: SequelizeStatic.BelongsToGetAssociationMixin<ActInstance>;
    setAct: SequelizeStatic.BelongsToSetAssociationMixin<ActInstance, number>;

    bookingStatus: BookingStatusInstance;
    createBookingStatus: SequelizeStatic.BelongsToCreateAssociationMixin<BookingStatusAttribute>;
    getBookingStatus: SequelizeStatic.BelongsToGetAssociationMixin<BookingStatusInstance>;
    setBookingStatus: SequelizeStatic.BelongsToSetAssociationMixin<BookingStatusInstance, number>;

    actApplication: ActApplicationInstance;
    createActApplication: SequelizeStatic.BelongsToCreateAssociationMixin<ActApplicationAttribute>;
    getActApplication: SequelizeStatic.BelongsToGetAssociationMixin<ActApplicationInstance>;
    setActApplication: SequelizeStatic.BelongsToSetAssociationMixin<ActApplicationInstance, number>;
}

export interface BookingDto extends BookingAttribute {
    event?: EventDto;
    act?: ActDto;
    bookingStatus?: BookingStatusDto;
    actApplication?: ActApplicationDto;
}

export interface BookingModel extends SequelizeStatic.Model<BookingInstance, BookingAttribute> {}<commit_msg>Try to get it working<commit_after>import * as SequelizeStatic from 'sequelize';
import { EventModel, EventAttribute, EventInstance, EventDto } from './event';
import { ActModel, ActAttribute, ActInstance, ActDto } from './act';
import { BookingStatusModel, BookingStatusAttribute, BookingStatusInstance, BookingStatusDto } from './booking-status';
import { ActApplicationModel, ActApplicationInstance, ActApplicationAttribute, ActApplicationDto } from './act-application';

export function booking(db: SequelizeStatic.Sequelize, BookingStatus: BookingStatusModel, ActApplication: ActApplicationModel)  {    
    let Booking = db.define<BookingInstance, BookingAttribute>('Booking', {
        tech_specs: SequelizeStatic.TEXT,
        size_of_act: SequelizeStatic.INTEGER,
        size_of_party: SequelizeStatic.INTEGER
        // budget
        // advertising priority
    }, {
        schema: 'eventplanner'
    });
    
   // Booking.belongsTo(BookingStatus);

    //Booking.hasOne(ActApplication);
    //ActApplication.belongsTo(Booking);

    // todos

    // sequence of fee records from negotiation
    
    return Booking;    
}

export interface BookingAttribute { 
    id?: number;
    createdAt?: Date;
    updatedAt?: Date;
    tech_specs?: string;
    size_of_act?: number;
    size_of_party?: number;
}

export interface BookingInstance extends SequelizeStatic.Instance<BookingAttribute>, BookingAttribute {    
    event: EventInstance;
    createEvent: SequelizeStatic.BelongsToCreateAssociationMixin<EventAttribute>;
    getEvent: SequelizeStatic.BelongsToGetAssociationMixin<EventInstance>;
    setEvent: SequelizeStatic.BelongsToSetAssociationMixin<EventInstance, number>;

    act: ActInstance;
    createAct: SequelizeStatic.BelongsToCreateAssociationMixin<ActAttribute>;
    getAct: SequelizeStatic.BelongsToGetAssociationMixin<ActInstance>;
    setAct: SequelizeStatic.BelongsToSetAssociationMixin<ActInstance, number>;

    bookingStatus: BookingStatusInstance;
    createBookingStatus: SequelizeStatic.BelongsToCreateAssociationMixin<BookingStatusAttribute>;
    getBookingStatus: SequelizeStatic.BelongsToGetAssociationMixin<BookingStatusInstance>;
    setBookingStatus: SequelizeStatic.BelongsToSetAssociationMixin<BookingStatusInstance, number>;

    actApplication: ActApplicationInstance;
    createActApplication: SequelizeStatic.BelongsToCreateAssociationMixin<ActApplicationAttribute>;
    getActApplication: SequelizeStatic.BelongsToGetAssociationMixin<ActApplicationInstance>;
    setActApplication: SequelizeStatic.BelongsToSetAssociationMixin<ActApplicationInstance, number>;
}

export interface BookingDto extends BookingAttribute {
    event?: EventDto;
    act?: ActDto;
    bookingStatus?: BookingStatusDto;
    actApplication?: ActApplicationDto;
}

export interface BookingModel extends SequelizeStatic.Model<BookingInstance, BookingAttribute> {}
{'fraction_non_alphanumeric': 0.08009708737864078, 'fraction_numerical': 0.0, 'mean_word_length': 5.533408833522084, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2985888', 'n_tokens_mistral': 1595, 'n_tokens_neox': 1574, 'n_words': 292}