internal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentsListPgToEntity

func ContentsListPgToEntity(c []*Content) []*entities.Content

func EventsListPgToEntity

func EventsListPgToEntity(e []*Event) []*entities.Event

func Migrate

func Migrate(db *gorm.DB) error

Types

type Base

type Base struct {
	ID        string `gorm:"type:uuid"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Content

type Content struct {
	Name        string `gorm:"primaryKey"`
	ContentType string
	Body        string
}

func ContentEntityToPg

func ContentEntityToPg(c *entities.Content) *Content

func (*Content) ToEntity

func (c *Content) ToEntity() *entities.Content

type Event

type Event struct {
	Base
	Name        string
	Description string
	EventType   string
	Start       time.Time
	End         time.Time
	WholeDay    bool
}

func EventEntityToPg

func EventEntityToPg(e *entities.Event) *Event

func (*Event) ToEntity

func (e *Event) ToEntity() *entities.Event

Jump to

Keyboard shortcuts

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