contentelements

package module
v0.0.0-...-839060e Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

contentelements

universal module for content management

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App core.App

Functions

func Configure

func Configure(a core.App)

Types

type Contentcomment

type Contentcomment struct {
	gorm.Model
	Comment          string           `json:"comment" gorm:"type:varchar(500)"`
	UserID           int              `json:"userID"`
	Parent           int              `json:"parent"`
	ContentelementID int              `json:"contentelementID"`
	Comments         []Contentcomment `json:"comments" gorm:"auto_preload;foreignkey:Parent"`
}

type Contentcomments

type Contentcomments []Contentcomment

type Contentelement

type Contentelement struct {
	gorm.Model
	Urld        string           `json:"urld" valid:"ascii,required"`
	UserID      int              `json:"userID"`
	Parent      int              `json:"parent"`
	Title       string           `json:"title" valid:"required"`
	Description string           `json:"description" gorm:"type:varchar(500)"`
	Content     string           `json:"content" gorm:"type:text"`
	Meta_title  string           `json:"meta_title"`
	Meta_descr  string           `json:"meta_descr" gorm:"type:text"`
	Kind        string           `json:"kind"`
	Status      string           `json:"status" valid:"required,in(active|suspend|draft)"`
	Tags        string           `json:"tags"`
	Elements    []Contentelement `json:"elements" gorm:"auto_preload;foreignkey:Parent"`
	Comments    []Contentcomment `json:"comments"`
}

type Contentelements

type Contentelements []Contentelement

type Contenttag

type Contenttag struct {
	gorm.Model
	Name   string `json:"name"`
	Weight int    `json:"weight"`
}

type Contenttags

type Contenttags []Contenttag

type Parent

type Parent struct {
	Id   uint
	Name string
}

type Parents

type Parents []Parent

Jump to

Keyboard shortcuts

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