package data

import (
	"database/sql"
)

type Models struct {
	Users             UserModel
	UserIdentities    UserIdentityModel
	Issues            IssueModel
	Tokens            TokenModel
	Permissions       PermissionModel
	Roles             RoleModel
	BlindSigns        BlindSignModel
	Votes             VoteModel
	Options           OptionModel
	ParlWatcher       ParlWatcherModel
	DeviceTokens      DeviceTokenModel
}

func NewModels(db *sql.DB) Models {
	return Models{
		Users:             UserModel{DB: db},
		UserIdentities:    UserIdentityModel{DB: db},
		Issues:            IssueModel{DB: db},
		Tokens:            TokenModel{DB: db},
		Permissions:       PermissionModel{DB: db},
		Roles:             RoleModel{DB: db},
		BlindSigns:        BlindSignModel{DB: db},
		Votes:             VoteModel{DB: db},
		Options:           OptionModel{DB: db},
		ParlWatcher:       ParlWatcherModel{DB: db},
		DeviceTokens:      DeviceTokenModel{DB: db},
	}
}
