tables

package
v0.0.0-...-7ee3c9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupTable

type GroupTable struct {
	ID              uuid.UUID      `gorm:"primary_key;type:uuid;default:uuid_generate_v4()"`
	Name            string         `json:"group_name" validate:"required" gorm:"varchar(100)"`
	Type            string         `json:"type" validate:"required" gorm:"varchar(100)"` // tech, social, ... etc
	Owner           int            `json:"group_owner" validate:"required"`
	Bio             string         `json:"group_bio" validate:"required" gorm:"varchar(300)"`
	Tags            postgres.Jsonb `json:"tags" validate:"required"`
	NumGroupMembers int            `json:"num_group_members" validate:"required"`
	GroupMembers    postgres.Jsonb `json:"group_member_ids" valudate:"-"`
}

func (GroupTable) MigrateSchemaOrCreateTable

func (table GroupTable) MigrateSchemaOrCreateTable(db *gorm.DB, logger *zap.Logger)

type TeamTable

type TeamTable struct {
	ID                 uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4()"`
	CreatedAt          time.Time
	UpdatedAt          time.Time
	Name               string         `json:"name" validate:"required" gorm:"type:varchar(100)"` // team name
	Tags               postgres.Jsonb `json:"tags" validate:"required"`
	Email              string         `json:"email" validate:"required" gorm:"type:varchar(100)"`
	Type               string         `json:"type" validate:"required" gorm:"type:varchar(100)"`     // investor or startup team
	Overview           string         `json:"overview" validate:"required" gorm:"type:varchar(300)"` // about the team
	IndustryOfInterest string         `json:"industry" validate:"required" gorm:"type:varchar(100)"` // industry of interest
	FoundedDate        date.Date      `json:"founded_date "validate:"required""`
	Founders           postgres.Jsonb `json:"founder" validate:"required"`
	NumberOfEmployees  int            `json:"number_of_employees" validate:"required"` // size of team
	Headquarters       string         `json:"headquarters,omitempty" validate:"-" gorm:"type:varchar(100)"`
	Interests          string         `json:"interests,omitempty" validate:"-" gorm:"type:varchar(400)"`
	InvestorDetails    postgres.Jsonb `json:"investor_details" validate:"required"`
	StartupDetails     postgres.Jsonb `json:"startup_details" validate:"required"`
	TeamMembers        postgres.Jsonb `json:"team_members,omitempty" validate:"-"`
	Advisors           postgres.Jsonb `json:"advisors,omitempty" validate:"-"`
	SocialMedia        postgres.Jsonb `json:"social_media,omitempty" validate:"-"`
	Contact            postgres.Jsonb `json:"contact,omitempty" validate:"-"`
}

func (TeamTable) MigrateSchemaOrCreateTable

func (table TeamTable) MigrateSchemaOrCreateTable(db *gorm.DB, logger *zap.Logger)

type UserTable

type UserTable struct {
	ID                uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4()"`
	CreatedAt         timestamp.Timestamp
	UpdatedAt         timestamp.Timestamp
	Type              string         `json:"user_type" validate:"required" gorm:"type:varchar(100)"`
	FirstName         string         `json:"first_name" validate:"required" gorm:"type:varchar(100);column:firstname"`
	LastName          string         `json:"last_name" validate:"required" gorm:"type:varchar(100);column:lastname"`
	UserName          string         `json:"user_name" validate:"required" gorm:"type:varchar(100);unique_index;column:username"`
	Gender            string         `json:"gender" validate:"-" gorm:"type:varchar(100)"`
	Languages         string         `json:"Languages" validate:"-" gorm:"type:text"`
	Email             string         `json:"email" validate:"required,email" gorm:"type:varchar(100)"`
	PassWord          string         `json:"password" validate:"required,gte=8,lte=20" gorm:"type:varchar(200)"`
	PassWordConfirmed string         `json:"password_confirmed" validate:"required,gte=8,lte=20" gorm:"type:varchar(200)"`
	Age               int32          `json:"age" validate:"gte=0,lte=120"`
	BirthDate         string         `json:"birth_date" validate:"required"`
	PhoneNumber       string         `json:"phone_number,omitempty" validate:"required"`
	Bio               string         `json:"bio,omitempty" validate:"required"`
	Headline          string         `json:"headline,omitempty" validate:"max=30"`
	Intent            string         `json:"intent,omitempty" validate:"required"`
	Addresses         postgres.Jsonb `json:"location,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Education         postgres.Jsonb `json:"education,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	UserInterests     postgres.Jsonb `json:"interests,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Subscriptions     postgres.Jsonb `json:"subscriptions,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Skills            postgres.Jsonb `json:"skillset,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Teams             postgres.Jsonb `json:"associated_teams,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Groups            postgres.Jsonb `json:"associated_groups,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	SocialMedia       postgres.Jsonb `json:"social_media,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
	Settings          postgres.Jsonb `json:"settings,omitempty" validate:"-" gorm:"type:jsonb;not null;default '{}'"`
}

func (UserTable) MigrateSchemaOrCreateTable

func (table UserTable) MigrateSchemaOrCreateTable(db *gorm.DB, logger *zap.Logger)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL