func CreateSite(db *gorm.DB, title string, domain string, siteType int, themeID int, destinationDomain string) Site {
	site := Site{
		Title:             title,
		Domain:            domain,
		Type:              siteType,
		ThemeID:           themeID,
		DestinationDomain: destinationDomain,
	}
	if err := db.Create(&site).Error; err != nil {
		fmt.Println("Could not create site")
		return site
	}
	return site
}
CreateSite is a method which creates a site using gorm
package structs
import (
	"fmt"
	"gorm.io/gorm"
)
type Site struct {
	gorm.Model
	Title             string `gorm:"size:255"`
	Domain            string `gorm:"size:255;unique_index"`
	DestinationDomain string
	Type              int
	Theme             Theme
	ThemeID           int
	Users             []*User `gorm:"many2many:user_sites;"`
}