postgres

package
v0.0.0-...-0575462 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	ID          int64     `gorm:"type:bigint NOT NULL;primary_key"`
	GroupID     int64     `gorm:"type:bigint NOT NULL"`
	CreatorID   int64     `gorm:"type:bigint NOT NULL"`
	Name        string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	StartDate   time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`
	EndDate     time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`
	CreatedDate time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`

	Group Group `gorm:"foreignkey:GroupID"`
	User  User  `gorm:"foreignkey:CreatorID"`
}

type Group

type Group struct {
	ID          int64     `gorm:"type:bigint NOT NULL;primary_key"`
	GroupName   string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	CreatedDate time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`

	Users []User `gorm:"many2many:user_group;"`
}

type Schedule

type Schedule struct {
	ID          int64     `gorm:"type:bigint NOT NULL;primary_key"`
	ActivityID  int64     `gorm:"type:bigint NOT NULL"`
	Name        string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	Comment     string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	StartDate   time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`
	EndDate     time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`
	CreatedDate time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`

	Activity Activity `gorm:"foreignkey:ActivityID"`
	Users    []User   `gorm:"many2many:user_schedule;"`
}

type User

type User struct {
	ID          int64     `gorm:"type:bigint NOT NULL;primary_key"`
	Account     string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	Password    string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	Name        string    `gorm:"type:varchar(16) NOT NULL DEFAULT ''"`
	Avatar      string    `gorm:"type:varchar(64) NOT NULL DEFAULT ''"`
	CreatedDate time.Time `gorm:"type:timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP"`

	Groups    []Group    `gorm:"many2many:user_group;"`
	Schedules []Schedule `gorm:"many2many:user_schedule;"`
}

Jump to

Keyboard shortcuts

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