channels

package module
v0.0.82 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 18 Imported by: 0

README

Channels Package

The Channels work in harmony to enhance content management in websites. Channels provide structured containers for organizing diverse data, each tailored to a specific content type. Our Channels package offers a robust solution for organizing and managing data within your Golang projects, providing a structured framework for seamless information storage and retrieval.

Features

  • Enables retrieving channels, fetching channels based on user permissions, and obtaining details about specific channels by their IDs.
  • Administrators can create, edit, and delete channels, as well as modify their status.
  • Facilitates the management of channel entries by allowing administrators to retrieve all entries across channels, fetch published entries, create new entries, and delete existing ones.
  • Retrieving additional field data for specific channels, fetching details about individual entries by their IDs, updating entry details, modifying entry statuses.
  • Retrieval of master field types for channels and provides a list of channels for display on the admin dashboard.

Installation

go get github.com/spurtcms/channels

Usage Example

import(
	"github.com/spurtcms/auth"
	"github.com/spurtcms/channel"
)

func main() {

	Auth := auth.AuthSetup(auth.Config{
		UserId:     1,
		ExpiryTime: 2,
		SecretKey:  SecretKey,
	})

	token, _ := Auth.CreateToken()

	Auth.VerifyToken(token, SecretKey)

	permisison, _ := Auth.IsGranted("Channels", auth.CRUD)

	channel := ChannelSetup(Config{
		DB:               &gorm.DB{},
		AuthEnable:       true,
		PermissionEnable: true,
		Auth:             Auth,
	})

	//channels
	if permisison {

		//list channel
		channellist, count, err := channel.ListChannel(10, 0, Filter{Keyword: ""}, true, true)
		fmt.Println(channellist, count, err)

		//create channel
		cchannel, err := channel.CreateChannel(ChannelCreate{ChannelName: "demo", ChannelDescription: "demo", CategoryIds: []string{"56,77"}, CreatedBy: 1},1,1)
		fmt.Println(cchannel, err)

		//update channel
		uerr := channel.EditChannel("demo2", "demo2", 2, 1, []string{"55,44"},1)
		fmt.Println(uerr)

		//delete channel
		derr := channel.DeleteChannel(1, 1,"",1)
		fmt.Println(derr)

		//create additionfield
		field1value := Fiedlvalue{FieldName: "text", MasterFieldId: 2, OrderIndex: 1, IconPath: "/public/img/text.svg"}
		field2value := Fiedlvalue{FieldName: "date&time", MasterFieldId: 4, OrderIndex: 2, IconPath: "/public/img/date-time.svg",DateFormat: "DD/MM/YYYY",TimeFormat: "12"}

		err := channel.CreateAdditionalFields(ChannelAddtionalField{FieldValues: []Fiedlvalue{field1value, field2value}, CreatedBy: 1}, 10, 1)

		if err != nil {

			panic(err)
		}

	}

	cpermisison, _ := Auth.IsGranted("Entries", auth.CRUD)

	if cpermisison {

		//channelentries list
		entries, filtercount, overallcount, err := channel.ChannelEntriesList(Entries{
			ChannelId:                1,
			Limit:                    10,
			Offset:                   0,
			Keyword:                  "",
			ChannelName:              "",
			SelectedCategoryFilter:   true,
			Publishedonly:            true,
			ActiveChannelEntriesonly: true,
			MemberProfile:            true,
		},1)

		fmt.Println(entries, filtercount, overallcount, err)

		//create entry
		entries, flg, err := channel.CreateEntry(EntriesRequired{Title: "golang", Content: "about go", ChannelId: 1,CreatedBy: 1}, 1)

		if err != nil {

			panic(err)
		}

		fmt.Println(entry, flg, err)

		//update entry
		channel.UpdateEntry(EntriesRequired{
			Title:      "demo2",
			Content:    "demo2",
			CoverImage: "",
		}, "demo", 1,1)

		//delete entry
		flg, derr := channel.DeleteEntry("demo", 1, 1,1)

		if derr != nil {

			fmt.Println(derr)
		}

	}
}

Getting help

If you encounter a problem with the package,please refer [Please refer [(https://www.spurtcms.com/documentation/cms-admin)] or you can create a new Issue in this repo[https://github.com/spurtcms/channels/issues].

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorAuth       = errors.New("auth enabled not initialised")
	ErrorPermission = errors.New("permissions enabled not initialised")
	ErrorChannelId  = errors.New("invalid channelid")
	Empty           string
	TenantId, _     = strconv.Atoi(os.Getenv("Tenant_ID"))
)

Functions

func AuthandPermission

func AuthandPermission(channel *Channel) error

func Categories

func Categories(categoryid int, DB *gorm.DB, tenantid int) string

return all parentid to child ids aray

func CategoriesByUsingName

func CategoriesByUsingName(categoryname string, DB *gorm.DB, tenantid int) string

using name

func IsDeleted

func IsDeleted(db *gorm.DB) *gorm.DB

soft delete check

func TruncateDescription

func TruncateDescription(description string, limit int) string

Types

type AdditionalFields

type AdditionalFields struct {
	Id            int
	FieldName     string
	FieldValue    string
	FieldId       int
	MultipleValue []string
	ModifiedBy    int
}

type Author

type Author struct {
	AuthorID         int       `json:"AuthorId" gorm:"column:id"`
	FirstName        string    `json:"FirstName"`
	LastName         string    `json:"LastName"`
	Email            string    `json:"Email"`
	MobileNo         *string   `json:"MobileNo,omitempty"`
	IsActive         *int      `json:"IsActive,omitempty"`
	ProfileImage     *string   `json:"ProfileImage,omitempty"`
	ProfileImagePath *string   `json:"ProfileImagePath,omitempty"`
	CreatedOn        time.Time `json:"CreatedOn"`
	CreatedBy        int       `json:"CreatedBy"`
}

type Channel

type Channel struct {
	DB               *gorm.DB
	AuthEnable       bool
	PermissionEnable bool
	Auth             *auth.Auth
	Userid           int
	DataAccess       int
}

func ChannelSetup

func ChannelSetup(config Config) *Channel

Channelsetup used to initialie channel configuration

func (*Channel) AddChanneltoMycollecton added in v0.0.72

func (channel *Channel) AddChanneltoMycollecton(channelid int, tenantid int, userid int, moduleid int) (bool, error)

func (*Channel) ChangeChannelStatus

func (channel *Channel) ChangeChannelStatus(channelid int, status, modifiedby int, tenantid int) (bool, error)

Change Channel status status 0 = inactive status 1 = active

func (*Channel) ChannelDetail added in v0.0.17

func (channel *Channel) ChannelDetail(inputs Channels) (channelDetails Tblchannel, err error)

func (*Channel) ChannelEntriesList

func (channel *Channel) ChannelEntriesList(entry Entries, tenantid int) (entries []Tblchannelentries, filterentriescount int, totalentriescount int, err error)

get channel Entries List

func (*Channel) ChannelType added in v0.0.23

func (channel *Channel) ChannelType(Channels Tblchannel) error

Channel type change

func (*Channel) CheckNameInChannel added in v0.0.72

func (channel *Channel) CheckNameInChannel(channelid int, cname string, tenantid int) (bool, error)

func (*Channel) CreateAdditionalFields

func (channel *Channel) CreateAdditionalFields(channelcreate ChannelAddtionalField, channelid int, tenantid int) error

create additional fields

func (*Channel) CreateChannel

func (channel *Channel) CreateChannel(channelcreate ChannelCreate, moduleid int, tenantid int) (TblChannel, error)

create channel

func (*Channel) CreateChannelEntryFields

func (channel *Channel) CreateChannelEntryFields(entryid int, createdby int, AdditionalFields []AdditionalFields, tenantid int) error

func (*Channel) CreateEntry

func (channel *Channel) CreateEntry(entriesrequired EntriesRequired, tenantid int) (entry Tblchannelentries, flg bool, err error)

create entry

func (*Channel) DashBoardChannelCount added in v0.0.42

func (channel *Channel) DashBoardChannelCount(tenantid int) (Totalcount int, lcount int, err error)

last 10 days la add pana channel count

func (*Channel) DashboardChannellist

func (channel *Channel) DashboardChannellist(tenantid int) (channelList []Tblchannel, err error)

func (*Channel) DashboardEntriesCount

func (channel *Channel) DashboardEntriesCount(tenantid int) (totalcount int, lasttendayscount int, err error)

DashboardEntry count function

func (*Channel) DashboardEntrieslist

func (channel *Channel) DashboardEntrieslist(tenantid int) (entries []Tblchannelentries, err error)

DashboardEntries

func (*Channel) DashboardRecentActivites

func (channel *Channel) DashboardRecentActivites(tenantid int) (entries []RecentActivities, err error)

Recent activites for dashboard

func (*Channel) DefaultChannel added in v0.0.66

func (channel *Channel) DefaultChannel(slug string, tenantid int) (int, error)

func (*Channel) DeleteChannel

func (channel *Channel) DeleteChannel(channelid, modifiedby int, routename string, tenantid int) error

Delete Channel

func (*Channel) DeleteChannelPermissions

func (channel *Channel) DeleteChannelPermissions(channelid int) error

func (*Channel) DeleteEntry

func (channel *Channel) DeleteEntry(ChannelName string, modifiedby int, Entryid int, tenantid int) (bool, error)

func (*Channel) DeleteSelectedEntry

func (channel *Channel) DeleteSelectedEntry(Entryid []int, modifiedby int, tenantid int) (bool, error)

MULTI SELECT ENTRY DELETE FUNCTION//

func (*Channel) EditChannel

func (channel *Channel) EditChannel(ChannelName string, ChannelDescription string, modifiedby int, channelid int, CategoryIds []string, tenantid int) error

Edit channel

func (*Channel) EntryAuthors added in v0.0.69

func (channel *Channel) EntryAuthors(tenantid int) ([]Author, error)

func (*Channel) EntryDetailsById

func (channel *Channel) EntryDetailsById(Ent IndivEntriesReq, tenantid int) (Tblchannelentries, error)

get entry details

func (*Channel) EntryIsActive added in v0.0.26

func (channel *Channel) EntryIsActive(entryid int, status int, modifiedby int, tenantid int) (bool, error)

Entry is_active

func (*Channel) EntryParentIdUpdate added in v0.0.35

func (channel *Channel) EntryParentIdUpdate(parentid, entriid, tenantid, userid int) error

func (*Channel) EntryPreview added in v0.0.25

func (channel *Channel) EntryPreview(uuid string) (Entry TblChannelEntries, flg bool, err error)

Entry Preview

func (*Channel) EntryStatus

func (channel *Channel) EntryStatus(ChannelName string, EntryId int, status int, modifiedby int, tenantid int) (bool, error)

change entries status

func (*Channel) EntrylistByParentId added in v0.0.36

func (channel *Channel) EntrylistByParentId(entryid int, tenantid int) ([]Tblchannelentries, error)

func (*Channel) FetchChannelEntryDetail added in v0.0.31

func (channel *Channel) FetchChannelEntryDetail(inputs EntriesInputs, multiFetchIds []int) (Tblchannelentries, []Tblchannelentries, error)

fetch channel netry details

func (*Channel) FlexibleChannelEntriesList added in v0.0.18

func (channel *Channel) FlexibleChannelEntriesList(input EntriesInputs) (ChannelEntries []Tblchannelentries, FilterCount int, TotalCount int, err error)

Channel entries list retrieval function with a feature to get entries related datas

func (*Channel) GetAllMasterFieldType

func (channel *Channel) GetAllMasterFieldType(tenantid int) (field []TblFieldType, err error)

Get All Master Field type

func (*Channel) GetChannal added in v0.0.73

func (channel *Channel) GetChannal(chname string, tenantid int) int

func (*Channel) GetChannelCount added in v0.0.6

func (channel *Channel) GetChannelCount(tenantid int) (count int, err error)

Get channel count

func (*Channel) GetChannelEntriesById added in v0.0.65

func (channel *Channel) GetChannelEntriesById(id int, tenantid int) (*TblChannelEntries, error)

func (*Channel) GetChannelsById

func (channel *Channel) GetChannelsById(channelid int, tenantid int) (channelList Tblchannel, SelectedCategories []categories.Arrangecategories, err error)

Get Channels By Id

func (*Channel) GetChannelsFieldsById

func (channel *Channel) GetChannelsFieldsById(channelid int, tenantid int) (section []Section, fields []Fiedlvalue, err error)

get channel fields by channel id

func (*Channel) GetChannelsWithEntries added in v0.0.6

func (channel *Channel) GetChannelsWithEntries(tenantid int) ([]Tblchannel, error)

func (*Channel) GetPermissionChannel added in v0.0.7

func (channel *Channel) GetPermissionChannel(tenantid int) (channels []Tblchannel, errr error)

func (*Channel) GetchannelByName

func (channel *Channel) GetchannelByName(channelname string, tenantid int) (channels Tblchannel, err error)

Get channel by name

func (*Channel) ListChannel

func (channel *Channel) ListChannel(inputs Channels) (channelList []Tblchannel, channelcount int, err error)

get all channel list

func (*Channel) MakeFeature

func (channel *Channel) MakeFeature(channelid, entryid, status int, tenantid int) (flag bool, err error)

make feature function

func (*Channel) MakeFeatureEntry

func (channel *Channel) MakeFeatureEntry(channelid, entryid, status int, tenantid int) (flag bool, err error)

Makefeature helps to highlights entry, only one entry should be featured of each channel and that is also optional

func (*Channel) RemoveEntriesCoverImage

func (channel *Channel) RemoveEntriesCoverImage(ImagePath string, tenantid int) error

Remove entries cover image if media image delete

func (*Channel) UnpublishSelectedEntry added in v0.0.8

func (channel *Channel) UnpublishSelectedEntry(entryid []int, status int, modifiedby int, tenantid int) (bool, error)

MULTI SELECTE ENTRY UNPUBLISHED FUNCTION//

func (*Channel) UpdateAdditionalField

func (channel *Channel) UpdateAdditionalField(AdditionalFields []AdditionalFields, EntryId int, tenantid int) (bool, error)

update entry additional fields

func (*Channel) UpdateChannelEntryViewCount added in v0.0.31

func (channel *Channel) UpdateChannelEntryViewCount(id int, slug string, tenantId int) (int, error)

update channel entry view count

func (*Channel) UpdateChannelField

func (channel *Channel) UpdateChannelField(channelupt ChannelUpdate, channelid int, tenantid int) error

func (*Channel) UpdateEntry

func (channel *Channel) UpdateEntry(entriesrequired EntriesRequired, ChannelName string, EntryId int, tenantid int) (bool, error)

update entry

func (*Channel) UpdateEntryOrder added in v0.0.39

func (channel *Channel) UpdateEntryOrder(Entryids []int, tenantid, userid, offset int) error

Update entry Reorder

func (*Channel) UpdateEntryOrderIndex added in v0.0.56

func (channel *Channel) UpdateEntryOrderIndex(Ordenindex int, EntryId int, userid int, tenantid int) (bool, error)

update entries orderindex

func (*Channel) UpdateMemberGroupIds added in v0.0.44

func (channel *Channel) UpdateMemberGroupIds(membergrbids string, entryid int, tenantid int, userid int) error

Update Access Permission MemberGroupIds in Entry

type ChannelAddtionalField

type ChannelAddtionalField struct {
	Sections    []Section
	FieldValues []Fiedlvalue
	CreatedBy   int
}

type ChannelCreate

type ChannelCreate struct {
	ChannelName        string
	ChannelDescription string
	CategoryIds        []string
	CreatedBy          int
}

type ChannelModel

type ChannelModel struct {
	Userid     int
	Dataaccess int
}
var CH ChannelModel

func (ChannelModel) AllChannelCount added in v0.0.42

func (ch ChannelModel) AllChannelCount(DB *gorm.DB, tenantid int) (count int64, err error)

func (ChannelModel) ChangeChanelType added in v0.0.23

func (ch ChannelModel) ChangeChanelType(Channels Tblchannel, DB *gorm.DB) (Error error)

Channel type change

func (ChannelModel) ChannelDetail added in v0.0.17

func (Ch ChannelModel) ChannelDetail(DB *gorm.DB, inputs Channels, channelDetail *Tblchannel) error

func (ChannelModel) ChannelIsActive

func (Ch ChannelModel) ChannelIsActive(tblch *TblChannel, id, val int, DB *gorm.DB, tenantid int) error

Isactive channel

func (ChannelModel) Channellist

func (Ch ChannelModel) Channellist(DB *gorm.DB, channel *Channel, inputs Channels, channels *[]Tblchannel, count *int64) (err error)

channel list

func (ChannelModel) CheckChannelCategoryAlreadyExitst

func (Ch ChannelModel) CheckChannelCategoryAlreadyExitst(channelid int, categoryids string, DB *gorm.DB, tenantid int) error

CheckCategoryId Already Exists

func (ChannelModel) CheckNameInChannel added in v0.0.72

func (ch ChannelModel) CheckNameInChannel(channelid int, channelname string, DB *gorm.DB, tenantid int) (channel TblChannel, err error)

func (ChannelModel) CreateChannel

func (Ch ChannelModel) CreateChannel(chn *TblChannel, DB *gorm.DB) (TblChannel, error)

Craete channel

func (ChannelModel) CreateChannelCategory

func (Ch ChannelModel) CreateChannelCategory(channelcategory *TblChannelCategorie, DB *gorm.DB) error

Create Channel Categories

func (ChannelModel) CreateFieldOption

func (Ch ChannelModel) CreateFieldOption(optval *TblFieldOption, DB *gorm.DB) error

create option value

func (ChannelModel) CreateFields

func (Ch ChannelModel) CreateFields(flds *TblField, DB *gorm.DB) (*TblField, error)

create field

func (ChannelModel) CreateGroupField

func (Ch ChannelModel) CreateGroupField(grpfield *TblGroupField, DB *gorm.DB) error

func (ChannelModel) DeleteChannelById

func (Ch ChannelModel) DeleteChannelById(id int, DB *gorm.DB, tenantid int) error

Delete Channel

func (ChannelModel) DeleteChannelCategoryByValue

func (Ch ChannelModel) DeleteChannelCategoryByValue(category *tblchannelcategory, id int, DB *gorm.DB, tenantid int) error

Delete Channel Category

func (ChannelModel) DeleteEntryByChannelId

func (Ch ChannelModel) DeleteEntryByChannelId(id int, DB *gorm.DB, tenantid int) error

func (ChannelModel) DeleteFieldById

func (Ch ChannelModel) DeleteFieldById(field *TblField, id []int, DB *gorm.DB, tenantid int) error

Delete Field By Id

func (ChannelModel) DeleteFieldGroupById

func (Ch ChannelModel) DeleteFieldGroupById(tblfieldgrp *TblFieldGroup, id int, DB *gorm.DB, tenantid int) error

Delete Channel

func (ChannelModel) DeleteFieldOptionById

func (Ch ChannelModel) DeleteFieldOptionById(fieldopt *TblFieldOption, id []string, fid int, DB *gorm.DB, tenantid int) error

Delete FieldOption By fieldid

func (ChannelModel) DeleteOptionById

func (Ch ChannelModel) DeleteOptionById(fieldopt *TblFieldOption, id []int, fid []int, DB *gorm.DB, tenantid int) error

Delete FieldOption By fieldid

func (ChannelModel) GetAllField

func (Ch ChannelModel) GetAllField(DB *gorm.DB, tenantid int) (channel []TblFieldType, err error)

Get all master fields

func (ChannelModel) GetCategoriseById

func (Ch ChannelModel) GetCategoriseById(id []int, DB *gorm.DB, tenantid int) (category []categories.TblCategories, err error)

func (ChannelModel) GetChannelByChannelName

func (Ch ChannelModel) GetChannelByChannelName(name string, DB *gorm.DB, tenantid int) (ch Tblchannel, err error)

func (ChannelModel) GetChannelById

func (Ch ChannelModel) GetChannelById(id int, DB *gorm.DB, tenantid int) (ch Tblchannel, err error)

Get Channel

func (ChannelModel) GetChannelCategoryNotExist

func (Ch ChannelModel) GetChannelCategoryNotExist(category *[]tblchannelcategory, channelid int, categoryids []string, DB *gorm.DB, tenantid int) error

func (ChannelModel) GetChannelCount added in v0.0.6

func (ch ChannelModel) GetChannelCount(count *int64, DB *gorm.DB, tenantid int) error

func (ChannelModel) GetChannelEntriesByChannelId added in v0.0.6

func (ch ChannelModel) GetChannelEntriesByChannelId(channel_entries *[]TblChannelEntries, channel_id int, DB *gorm.DB, tenantid int) error

func (ChannelModel) GetChannelId added in v0.0.73

func (ch ChannelModel) GetChannelId(chname string, tenantid int, DB *gorm.DB) (int, error)

func (ChannelModel) GetChannels added in v0.0.6

func (ch ChannelModel) GetChannels(channels *[]Tblchannel, DB *gorm.DB, tenantid int) error

func (ChannelModel) GetFieldAndOptionValue

func (Ch ChannelModel) GetFieldAndOptionValue(id []int, DB *gorm.DB, tenantid int) (fld []tblfield, err error)

Get optionvalue

func (ChannelModel) GetFieldIdByGroupId

func (Ch ChannelModel) GetFieldIdByGroupId(id int, DB *gorm.DB, tenantid int) (grpfield []TblGroupField, err error)

Getfieldid using fieldgroupid

func (ChannelModel) GetPermissionChannel added in v0.0.7

func (ch ChannelModel) GetPermissionChannel(channels *Channel, DB *gorm.DB, tenantid int) (channel []Tblchannel, err error)

func (ChannelModel) GetSelectedCategoryChannelById

func (Ch ChannelModel) GetSelectedCategoryChannelById(id int, DB *gorm.DB, tenantid int) (ChannelCategory []tblchannelcategory, err error)

func (ChannelModel) MakeFeature

func (ch ChannelModel) MakeFeature(channelid, entryid, status int, DB *gorm.DB, tenantid int) (err error)

make feature function

func (ChannelModel) ModulePermissionChannelDelete added in v0.0.37

func (ch ChannelModel) ModulePermissionChannelDelete(routename string, DB *gorm.DB, tenantid int) error

func (ChannelModel) NewChannelCount added in v0.0.42

func (ch ChannelModel) NewChannelCount(DB *gorm.DB, tenantid int) (count int64, err error)

Last 10 days Channel Count

func (ChannelModel) UpdateChannelDetails

func (Ch ChannelModel) UpdateChannelDetails(chn *TblChannel, id int, DB *gorm.DB, TenantId int) error

Update Channel Details

func (ChannelModel) UpdateChannelNameInEntries

func (Ch ChannelModel) UpdateChannelNameInEntries(modper *permission.TblModulePermission, DB *gorm.DB, tenantid int) error

update channel entry permission

func (ChannelModel) UpdateFieldDetails

func (Ch ChannelModel) UpdateFieldDetails(fds *TblField, id int, DB *gorm.DB, tenantid int) error

Update Field Details

func (ChannelModel) UpdateFieldOption

func (Ch ChannelModel) UpdateFieldOption(fdoption *TblFieldOption, id int, DB *gorm.DB, tenantid int) error

Update Field Option Details

type ChannelUpdate

type ChannelUpdate struct {
	Sections           []Section
	FieldValues        []Fiedlvalue
	Deletesections     []Section
	DeleteFields       []Fiedlvalue
	DeleteOptionsvalue []OptionValues
	CategoryIds        []string
	ModifiedBy         int
}

type Channels added in v0.0.16

type Channels struct {
	Id             int
	Slug           string
	Limit          int
	Offset         int
	Keyword        string
	IsActive       bool
	SortBy         string
	SortingOrder   int
	TenantId       int
	EntriesCount   bool
	ChannelEntries bool
	AuthorDetail   bool
	CreateOnly     bool
	Count          bool
}

type Config

type Config struct {
	DB               *gorm.DB
	AuthEnable       bool
	PermissionEnable bool
	DataBaseType     Type
	Auth             *auth.Auth
}

type Entries

type Entries struct {
	ChannelId                int //if pass the channelid it will return that particular channel entries only otherwise return all
	Limit                    int
	Offset                   int
	Keyword                  string //filter
	Title                    string //filter
	ChannelName              string //filter
	Status                   string //filter
	UserName                 string //filter
	CategoryId               int    //filter
	CategoryName             string //filter
	SelectedCategoryFilter   bool   //selected category filter or selected category child filter also
	Publishedonly            bool   //if you want published entries only set true
	ActiveChannelEntriesonly bool   //if you want active channel entries only set true
	MemberProfile            bool   //if you want member profile set true
	AdditionalFields         bool   //if you want additionalfields set true
	AuthorDetails            bool   //if you want authordetails set true
	ContentHide              bool   //if you want hide content only for memberaccesscontrol set true otherwise it doesn't fetch the entry
	MemberAccessControl      bool
	MemberId                 int
	ImageUrlPath             string
	FieldTypeId              int
	MemberFieldTypeId        int
	Sorting                  string
	EntriesTitle             string
}

type EntriesInputs added in v0.0.18

type EntriesInputs struct {
	Id                     int
	Slug                   string
	Limit                  int
	Offset                 int
	SortBy                 string
	Order                  int
	Keyword                string
	Title                  string
	Status                 string
	ChannelId              int
	CategoryId             int
	CategorySlug           string
	TenantId               int
	SelectedCategoryFilter bool
	ActiveEntriesonly      bool
	GetMemberProfile       bool
	GetAdditionalFields    bool
	GetAuthorDetails       bool
	GetLinkedCategories    bool
	ContentHide            bool
	MemberAccessControl    bool
	MemberId               int
	SectionFieldTypeId     int
	MemberFieldTypeId      int
	TotalCount             bool
	Location               string
	Experience             string
	Posteddate             string
}

type EntriesModel

type EntriesModel struct {
	Userid     int
	Dataaccess int
}
var EntryModel EntriesModel

func (EntriesModel) AllentryCount

func (Ch EntriesModel) AllentryCount(DB *gorm.DB, tenantid int) (count int64, err error)

func (EntriesModel) ChannelEntryList

func (Ch EntriesModel) ChannelEntryList(filter Entries, channel *Channel, categoryid string, createonly bool, DB *gorm.DB, tenantid int) (chentry []Tblchannelentries, chentcount int64, err error)

List Channel Entry

func (EntriesModel) CreateChannelEntry

func (Ch EntriesModel) CreateChannelEntry(entry Tblchannelentries, DB *gorm.DB) (Tblchannelentries, error)

Create channel entry

func (EntriesModel) CreateEntrychannelFields

func (Ch EntriesModel) CreateEntrychannelFields(entryfield *[]TblChannelEntryField, DB *gorm.DB) error

create channel entry field

func (EntriesModel) CreateSingleEntrychannelFields

func (Ch EntriesModel) CreateSingleEntrychannelFields(entryfield *TblChannelEntryField, DB *gorm.DB) error

create channel entry field

func (EntriesModel) DeleteChannelEntryFieldId

func (Ch EntriesModel) DeleteChannelEntryFieldId(chentry *TblChannelEntryField, id int, DB *gorm.DB, tenantid int) error

Delete Channel Entry Field

func (EntriesModel) DeleteChannelEntryId

func (Ch EntriesModel) DeleteChannelEntryId(chentry *Tblchannelentries, id int, DB *gorm.DB, tenantid int) error

Delete Channel Entry Field

func (EntriesModel) DeleteSelectedChannelEntryFieldId

func (Ch EntriesModel) DeleteSelectedChannelEntryFieldId(chentry *TblChannelEntryField, id []int, DB *gorm.DB, tenantid int) error

Delete MULTI Channel Entry Field

func (EntriesModel) DeleteSelectedChannelEntryId

func (Ch EntriesModel) DeleteSelectedChannelEntryId(chentry *TblChannelEntries, id []int, DB *gorm.DB, tenantid int) error

Delete MULTI Channel Entry Field

func (EntriesModel) EntryAuthors added in v0.0.69

func (Ch EntriesModel) EntryAuthors(tenantid int, DB *gorm.DB) ([]Author, error)

func (EntriesModel) EntryIsActive added in v0.0.26

func (Ch EntriesModel) EntryIsActive(entryisactive Tblchannelentries, entryid int, status int, DB *gorm.DB, tenantid int) error

Entry IsActive Function

func (EntriesModel) EntryParentIdUpdate added in v0.0.35

func (Ch EntriesModel) EntryParentIdUpdate(Entries *Tblchannelentries, db *gorm.DB) error

func (EntriesModel) EntrylistByParentId added in v0.0.36

func (Ch EntriesModel) EntrylistByParentId(channel_entries *[]Tblchannelentries, parentid int, DB *gorm.DB, tenantid int) error

func (*EntriesModel) FlexibleChannelEntryDetail added in v0.0.31

func (En *EntriesModel) FlexibleChannelEntryDetail(db *gorm.DB, inputs EntriesInputs, multiFetchIds []int, channelEntryDetails *JoinEntries, multiEntryDetails *[]JoinEntries) error

func (EntriesModel) GetAuthorDetails

func (Ch EntriesModel) GetAuthorDetails(DB *gorm.DB, authorId int, tenantid int) (authorDetail team.TblUser, err error)

func (EntriesModel) GetCategoryIdByName

func (ch EntriesModel) GetCategoryIdByName(name string, DB *gorm.DB, tenantid int) (category categories.TblCategories, er error)

func (EntriesModel) GetChannelAdditionalFields added in v0.0.18

func (Ch EntriesModel) GetChannelAdditionalFields(DB *gorm.DB, channelId int) (fields []tblfield, err error)

func (EntriesModel) GetChannelEntryById

func (Ch EntriesModel) GetChannelEntryById(ent IndivEntriesReq, DB *gorm.DB, tenantid int) (tblchanentry Tblchannelentries, err error)

Edit Channel Entry

func (EntriesModel) GetChildCategories

func (ch EntriesModel) GetChildCategories(categoryid int, DB *gorm.DB, tenantid int) (categories []categories.TblCategories, er error)

func (EntriesModel) GetEntriesById added in v0.0.65

func (Ch EntriesModel) GetEntriesById(id int, DB *gorm.DB, tenantid int) (*TblChannelEntries, error)

func (EntriesModel) GetFieldOptions

func (ch EntriesModel) GetFieldOptions(DB *gorm.DB, fieldId int, tenantid int) (fieldOptions []TblFieldOption, err error)

func (EntriesModel) GetFieldValue

func (Ch EntriesModel) GetFieldValue(DB *gorm.DB, fieldId, entryId int, tenantid int) (fieldvalue TblChannelEntryField, err error)

func (EntriesModel) GetFieldsInEntries

func (Ch EntriesModel) GetFieldsInEntries(DB *gorm.DB, channelId, sectionTypeId int, tenantid int) (fields []tblfield, err error)

func (EntriesModel) GetFlexibleEntriesData added in v0.0.18

func (Ch EntriesModel) GetFlexibleEntriesData(input EntriesInputs, channel *Channel, db *gorm.DB, joinData *[]JoinEntries, commoncount, totalCount *int64) error

Fetching the channel entries data

func (EntriesModel) GetGraphqlEntriesCategoryByParentId

func (ch EntriesModel) GetGraphqlEntriesCategoryByParentId(DB *gorm.DB, categoryId int, tenantid int) (category categories.TblCategories, err error)

func (EntriesModel) GetMemberProfile

func (ch EntriesModel) GetMemberProfile(DB *gorm.DB, memberid int, tenantid int) (memberProfile member.TblMemberProfile, err error)

func (EntriesModel) GetPreview added in v0.0.25

func (Ch EntriesModel) GetPreview(chentry *TblChannelEntries, DB *gorm.DB, uuid string) (err error)

Entry Preview

func (EntriesModel) GetSectionsUnderEntries

func (Ch EntriesModel) GetSectionsUnderEntries(DB *gorm.DB, channelId, sectionTypeId int, tenantid int) (sections []tblfield, err error)

func (EntriesModel) MakeFeature

func (ch EntriesModel) MakeFeature(channelid, entryid, status int, DB *gorm.DB, tenantid int) (err error)

func (EntriesModel) MemberAccessCheck

func (ch EntriesModel) MemberAccessCheck(memberid int, DB *gorm.DB, tenantid int) ([]int, []int)

func (EntriesModel) Newchannels

func (Ch EntriesModel) Newchannels(DB *gorm.DB, tenantid int) (chn []Tblchannel, err error)

func (EntriesModel) Newentries

func (Ch EntriesModel) Newentries(DB *gorm.DB, tenantid int) (entries []Tblchannelentries, err error)

func (EntriesModel) NewentryCount

func (Ch EntriesModel) NewentryCount(DB *gorm.DB, tenantid int) (count int64, err error)

func (EntriesModel) PublishQuery

func (ch EntriesModel) PublishQuery(chl *TblChannelEntries, id int, DB *gorm.DB, tenantid int) error

func (EntriesModel) UnpublishSelectedChannelEntryId added in v0.0.8

func (Ch EntriesModel) UnpublishSelectedChannelEntryId(chentry *TblChannelEntries, id []int, DB *gorm.DB, tenantid int) error

UNPUBLISH MULTI SELECT ENTRY//

func (EntriesModel) UpdateChannelEntryAdditionalDetails

func (Ch EntriesModel) UpdateChannelEntryAdditionalDetails(entry TblChannelEntryField, DB *gorm.DB, tenantid int) error

Update Channel Entry Details

func (EntriesModel) UpdateChannelEntryDetails

func (Ch EntriesModel) UpdateChannelEntryDetails(entry *TblChannelEntries, entryid int, DB *gorm.DB, tenantid int) error

Update Channel Entry Details

func (EntriesModel) UpdateEntryMemberGroupIds added in v0.0.44

func (Ch EntriesModel) UpdateEntryMemberGroupIds(Entries *Tblchannelentries, DB *gorm.DB) error

func (EntriesModel) UpdateEntryOrder added in v0.0.39

func (Ch EntriesModel) UpdateEntryOrder(Entries *Tblchannelentries, DB *gorm.DB) error

func (EntriesModel) UpdateEntryOrderIndex added in v0.0.56

func (Ch EntriesModel) UpdateEntryOrderIndex(entry *TblChannelEntries, entryid int, DB *gorm.DB, tenantid int) error

func (*EntriesModel) UpdateEntryViewCount added in v0.0.31

func (En *EntriesModel) UpdateEntryViewCount(db *gorm.DB, id int, slug string, tenantId int, count *int) error

Update channel Entry View Count

func (EntriesModel) UpdateImagePath

func (Ch EntriesModel) UpdateImagePath(Imagepath string, DB *gorm.DB, tenantid int) error

update imagepath

type EntriesRequired

type EntriesRequired struct {
	Title              string
	Content            string
	CoverImage         string
	SEODetails         SEODetails
	CategoryIds        string
	MembershipLevelids string
	ChannelName        string
	Status             int
	ChannelId          int
	Author             string
	CreateTime         time.Time
	PublishTime        time.Time
	ReadingTime        int
	SortOrder          int
	Tag                string
	Excerpt            string
	CreatedBy          int
	ModifiedBy         int
	IsActive           int
	OrderIndex         int
	CtaId              int
}

type Fiedlvalue

type Fiedlvalue struct {
	MasterFieldId    int            `json:"MasterFieldId"`
	FieldId          int            `json:"FieldId"`
	NewFieldId       int            `json:"NewFieldId"`
	SectionId        int            `json:"SectionId"`
	SectionNewId     int            `json:"SectionNewId"`
	FieldName        string         `json:"FieldName"`
	DateFormat       string         `json:"DateFormat"`
	TimeFormat       string         `json:"TimeFormat"`
	OptionValue      []OptionValues `json:"OptionValue"`
	CharacterAllowed int            `json:"CharacterAllowed"`
	IconPath         string         `json:"IconPath"`
	Url              string         `json:"Url"`
	OrderIndex       int            `json:"OrderIndex"`
	Mandatory        int            `json:"Mandatory"`
}

type FieldValueId

type FieldValueId struct {
	Id     int
	CValue int
}

type Filter

type Filter struct {
	Keyword    string
	Status     bool
	CreateOnly bool
}

type IndivEntriesReq

type IndivEntriesReq struct {
	ChannelName       string
	EntryId           int
	MemberProfile     bool //if you want member profile set true
	AdditionalFields  bool //if you want additionalfields set true
	AuthorDetails     bool //if you want authordetails set true
	ContentHide       bool //if you want show entries name without content enable true, ensure want hide content only must be restricted in memberaccess
	CategoriesEnable  bool //
	MemberId          int
	ImageUrlPath      string
	FieldTypeId       int
	MemberFieldTypeId int
}

type JoinEntries added in v0.0.18

type JoinEntries struct {
	Id                int `gorm:"column:entry_id"`
	Title             string
	Slug              string
	Description       string
	UserID            int
	ChannelID         int
	Status            int
	IsActive          int
	CreatedOn         time.Time `gorm:"column:entry_created_on"`
	CreatedBy         int       `gorm:"column:entry_created_by"`
	ModifiedBy        int       `gorm:"column:entry_modified_by"`
	ModifiedOn        time.Time `gorm:"column:entry_modified_on"`
	IsDeleted         int
	DeletedOn         time.Time
	DeletedBy         int
	CoverImage        string
	ThumbnailImage    string
	MetaTitle         string
	MetaDescription   string
	Keyword           string
	CategoriesID      string
	RelatedArticles   string
	TenantId          int
	Feature           int
	Author            string
	SortOrder         int
	CreateTime        time.Time
	PublishedTime     time.Time
	ReadingTime       int
	Tags              string
	Excerpt           string
	ViewCount         int
	ImageAltTag       string
	ProfileId         int `gorm:"column:prof_id"`
	MemberID          int
	ProfileName       string
	ProfileSlug       string
	ProfilePage       string
	MemberDetails     datatypes.JSONMap
	CompanyName       string
	CompanyLocation   string
	About             string
	SeoTitle          string
	SeoDescription    string
	SeoKeyword        string
	Linkedin          string
	Twitter           string
	Website           string
	ProfCreatedBy     int       `gorm:"column:prof_created_by"`
	ProfCreatedOn     time.Time `gorm:"column:prof_created_on"`
	ProfModifiedOn    time.Time `gorm:"column:prof_modified_on"`
	ProfModifiedBy    int       `gorm:"column:prof_modified_by"`
	ClaimStatus       int
	ProfIsDeleted     int       `gorm:"column:prof_is_deleted"`
	ProfDeletedOn     time.Time `gorm:"column:prof_deleted_on"`
	ProfDeletedBy     int       `gorm:"column:prof_deleted_by"`
	ClaimDate         time.Time
	ProfTenantId      int    `gorm:"column:prof_tenant_id"`
	ProfStorageType   string `gorm:"column:prof_storage_type"`
	AuthorId          int    `gorm:"column:author_id"`
	FirstName         string
	LastName          string
	Email             string
	MobileNo          string
	AuthorActive      int `gorm:"column:author_active"`
	ProfileImagePath  string
	ProfileImage      string
	AuthorStorageType string    `gorm:"column:author_storage_type"`
	AuthorCreatedOn   time.Time `gorm:"column:author_created_on"`
	AuthorCreatedBy   int       `gorm:"column:author_created_by"`
	AuthorModifiedOn  time.Time `gorm:"column:author_modified_on"`
	AuthorModifiedBy  int       `gorm:"column:author_modified_by"`
	RoleId            int
	Username          string
	DataAccess        int
	LastLogin         time.Time
	AuthorIsDeleted   int       `gorm:"column:author_is_deleted"`
	AuthorDeletedOn   time.Time `gorm:"column:author_deleted_on"`
	AuthorDeletedBy   int       `gorm:"column:author_deleted_by"`
	DefaultLanguageId int
	UserTenantId      int `gorm:"column:user_tenant_id"`
	RoleName          string
	CtaId             int
}

type OptionValues

type OptionValues struct {
	Id         int    `json:"Id"`
	NewId      int    `json:"NewId"`
	FieldId    int    `json:"FieldId"`
	NewFieldId int    `json:"NewFieldId"`
	Value      string `json:"Value"`
	OrderIndex int    `json:"OrderIndex"`
}

type RecentActivities

type RecentActivities struct {
	Contenttype string
	Title       string
	User        string
	Imagepath   string
	Createdon   time.Time
	Active      string
	Channelname string
	NameString  string
}

type SEODetails

type SEODetails struct {
	MetaTitle       string
	MetaDescription string
	MetaKeywords    string
	MetaSlug        string
	ImageAltTag     string
}

type Section

type Section struct {
	SectionId     int    `json:"SectionId"`
	SectionNewId  int    `json:"SectionNewId"`
	SectionName   string `json:"SectionName"`
	MasterFieldId int    `json:"MasterFieldId"`
	OrderIndex    int    `json:"OrderIndex"`
}

type TblChannel

type TblChannel struct {
	Id                 int       `gorm:"primaryKey;auto_increment;type:serial"`
	ChannelName        string    `gorm:"type:character varying"`
	ChannelDescription string    `gorm:"type:character varying"`
	SlugName           string    `gorm:"type:character varying"`
	FieldGroupId       int       `gorm:"type:integer"`
	IsActive           int       `gorm:"type:integer"`
	IsDeleted          int       `gorm:"type:integer"`
	CreatedOn          time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy          int       `gorm:"type:integer"`
	ModifiedOn         time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy         int       `gorm:"DEFAULT:NULL"`
	TenantId           int       `gorm:"type:integer"`
	ChannelType        string    `gorm:"type:character varying"`
}

type TblChannelCategorie

type TblChannelCategorie struct {
	Id         int       `gorm:"primaryKey;auto_increment;type:serial"`
	ChannelId  int       `gorm:"type:integer"`
	CategoryId string    `gorm:"type:character varying"`
	CreatedAt  int       `gorm:"type:integer"`
	CreatedOn  time.Time `gorm:"type:timestamp without time zone"`
	TenantId   int       `gorm:"type:integer"`
}

type TblChannelEntries

type TblChannelEntries struct {
	Id                 int       `gorm:"primaryKey;auto_increment;type:serial"`
	Title              string    `gorm:"type:character varying"`
	Slug               string    `gorm:"type:character varying"`
	Description        string    `gorm:"type:character varying"`
	UserId             int       `gorm:"type:integer"`
	ChannelId          int       `gorm:"type:integer"`
	Status             int       `gorm:"type:integer"` //0-draft 1-publish 2-unpublish
	CoverImage         string    `gorm:"type:character varying"`
	ThumbnailImage     string    `gorm:"type:character varying"`
	MetaTitle          string    `gorm:"type:character varying"`
	MetaDescription    string    `gorm:"type:character varying"`
	Keyword            string    `gorm:"type:character varying"`
	CategoriesId       string    `gorm:"type:character varying"`
	RelatedArticles    string    `gorm:"type:character varying"`
	Feature            int       `gorm:"DEFAULT:0"`
	ViewCount          int       `gorm:"DEFAULT:0"`
	Author             string    `gorm:"type:character varying"`
	SortOrder          int       `gorm:"type:integer"`
	CreateTime         time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	PublishedTime      time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ReadingTime        int       `gorm:"type:integer;DEFAULT:0"`
	Tags               string    `gorm:"type:character varying"`
	Excerpt            string    `gorm:"type:character varying"`
	ImageAltTag        string    `gorm:"type:character varying"`
	CreatedOn          time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy          int       `gorm:"type:integer"`
	ModifiedBy         int       `gorm:"DEFAULT:NULL"`
	ModifiedOn         time.Time `gorm:"DEFAULT:NULL"`
	IsActive           int       `gorm:"type:integer"`
	IsDeleted          int       `gorm:"DEFAULT:0"`
	DeletedOn          time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy          int       `gorm:"DEFAULT:NULL"`
	Uuid               string    `gorm:"character varying"`
	OrderIndex         int       `gorm:"type:integer"`
	CtaId              int       `gorm:"type:integer"`
	MemebrshipLevelIds string    `gorm:"column:memebrship_level_ids"`
}

type TblChannelEntryField

type TblChannelEntryField struct {
	Id             int       `gorm:"primaryKey;auto_increment;type:serial"`
	FieldName      string    `gorm:"type:character varying"`
	FieldValue     string    `gorm:"type:character varying"`
	FieldTypeId    int       `gorm:"-:migration;<-:false"`
	ChannelEntryId int       `gorm:"type:integer"`
	FieldId        int       `gorm:"type:integer"`
	CreatedOn      time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy      int       `gorm:"type:integer"`
	ModifiedOn     time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy     int       `gorm:"DEFAULT:NULL"`
	DeletedBy      int       `gorm:"DEFAULT:NULL"`
	DeletedOn      time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	TenantId       int       `gorm:"type:integer"`
}

type TblField

type TblField struct {
	Id               int       `gorm:"primaryKey;auto_increment;type:serial"`
	FieldName        string    `gorm:"type:character varying"`
	FieldDesc        string    `gorm:"type:character varying"`
	FieldTypeId      int       `gorm:"type:integer"`
	MandatoryField   int       `gorm:"type:integer"`
	OptionExist      int       `gorm:"type:integer"`
	InitialValue     string    `gorm:"type:character varying"`
	Placeholder      string    `gorm:"type:character varying"`
	OrderIndex       int       `gorm:"type:integer"`
	ImagePath        string    `gorm:"type:character varying"`
	DatetimeFormat   string    `gorm:"type:character varying"`
	TimeFormat       string    `gorm:"type:character varying"`
	Url              string    `gorm:"type:character varying"`
	SectionParentId  int       `gorm:"type:integer"`
	CharacterAllowed int       `gorm:"type:integer"`
	CreatedOn        time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy        int       `gorm:"type:integer"`
	ModifiedOn       time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy       int       `gorm:"DEFAULT:NULL"`
	IsDeleted        int       `gorm:"DEFAULT:0"`
	DeletedOn        time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy        int       `gorm:"DEFAULT:NULL"`
	TenantId         int       `gorm:"type:integer"`
}

type TblFieldGroup

type TblFieldGroup struct {
	Id         int       `gorm:"primaryKey;auto_increment;type:serial"`
	GroupName  string    `gorm:"type:character varying"`
	CreatedOn  time.Time `gorm:"type:timestamp without time zone"`
	CreatedBy  int       `gorm:"type:integer"`
	ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy int       `gorm:"DEFAULT:NULL"`
	IsDeleted  int       `gorm:"DEFAULT:0"`
	DeletedOn  time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	DeletedBy  int       `gorm:"DEFAULT:NULL"`
}

type TblFieldOption

type TblFieldOption struct {
	Id          int       `gorm:"column:id"`
	OptionName  string    `gorm:"column:option_name"`
	OptionValue string    `gorm:"column:option_value"`
	FieldId     int       `gorm:"column:field_id"`
	CreatedOn   time.Time `gorm:"column:created_on"`
	CreatedBy   int       `gorm:"column:created_by"`
	ModifiedOn  time.Time `gorm:"column:modified_on;DEFAULT:NULL"`
	ModifiedBy  int       `gorm:"column:modified_by;DEFAULT:NULL"`
	IsDeleted   int       `gorm:"column:is_deleted;DEFAULT:0"`
	DeletedOn   time.Time `gorm:"column:deleted_on;DEFAULT:NULL"`
	DeletedBy   int       `gorm:"column:deleted_by;DEFAULT:NULL"`
	Idstring    string    `gorm:"-:migration;<-:false"`
	TenantId    int       `gorm:"type:integer"`
	OrderIndex  int       `gorm:"type:integer"`
}

type TblFieldType

type TblFieldType struct {
	Id         int       `gorm:"primaryKey;auto_increment;type:serial"`
	TypeName   string    `gorm:"type:character varying"`
	TypeSlug   string    `gorm:"type:character varying"`
	IsActive   int       `gorm:"type:integer"`
	IsDeleted  int       `gorm:"type:integer"`
	CreatedBy  int       `gorm:"type:integer"`
	CreatedOn  time.Time `gorm:"type:timestamp without time zone"`
	ModifiedBy int       `gorm:"type:integer"`
	ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
}

type TblGroupField

type TblGroupField struct {
	Id        int `gorm:"primaryKey;auto_increment;type:serial"`
	ChannelId int `gorm:"type:integer"`
	FieldId   int `gorm:"type:integer"`
	TenantId  int `gorm:"type:integer"`
}

type Tblchannel

type Tblchannel struct {
	Id                 int                 `gorm:"column:id"`
	ChannelName        string              `gorm:"column:channel_name"`
	ChannelDescription string              `gorm:"column:channel_description"`
	SlugName           string              `gorm:"column:slug_name"`
	FieldGroupId       int                 `gorm:"column:field_group_id"`
	IsActive           int                 `gorm:"column:is_active"`
	IsDeleted          int                 `gorm:"column:is_deleted"`
	CreatedOn          time.Time           `gorm:"column:created_on"`
	CreatedBy          int                 `gorm:"column:created_by"`
	ModifiedOn         time.Time           `gorm:"column:modified_on;DEFAULT:NULL"`
	ModifiedBy         int                 `gorm:"column:modified_by;DEFAULT:NULL"`
	DateString         string              `gorm:"-"`
	EntriesCount       int                 `gorm:"-"`
	ChannelEntries     []TblChannelEntries `gorm:"foreignKey:ChannelId"`
	ProfileImagePath   string              `gorm:"<-:false"`
	AuthorDetails      team.TblUser        `gorm:"foreignKey:Id;references:CreatedBy"`
	ChannelType        string              `gorm:"column:channel_type"`
	TenantId           int                 `gorm:"column:tenant_id"`
	Username           string              `gorm:"<-:false"`
	FirstName          string              `gorm:"<-:false"`
	LastName           string              `gorm:"<-:false"`
	NameString         string              `gorm:"<-:false"`
}

type Tblchannelentries

type Tblchannelentries struct {
	Id                   int                          `gorm:"column:id"`
	Title                string                       `gorm:"column:title"`
	Slug                 string                       `gorm:"column:slug"`
	Description          string                       `gorm:"column:description"`
	UserId               int                          `gorm:"column:user_id"`
	ChannelId            int                          `gorm:"column:channel_id"`
	Status               int                          `gorm:"column:status"` //0-draft 1-publish 2-unpublish
	IsActive             int                          `gorm:"column:is_active"`
	IsDeleted            int                          `gorm:"column:is_deleted;DEFAULT:0"`
	DeletedBy            int                          `gorm:"column:deleted_by;DEFAULT:NULL"`
	DeletedOn            time.Time                    `gorm:"column:deleted_on;DEFAULT:NULL"`
	CreatedOn            time.Time                    `gorm:"column:created_on"`
	CreatedBy            int                          `gorm:"column:created_by"`
	ModifiedBy           int                          `gorm:"column:modified_by;DEFAULT:NULL"`
	ModifiedOn           time.Time                    `gorm:"column:modified_on;DEFAULT:NULL"`
	CoverImage           string                       `gorm:"column:cover_image"`
	ThumbnailImage       string                       `gorm:"column:thumbnail_image"`
	MetaTitle            string                       `gorm:"column:meta_title"`
	MetaDescription      string                       `gorm:"column:meta_description"`
	Keyword              string                       `gorm:"column:keyword"`
	CategoriesId         string                       `gorm:"column:categories_id"`
	MemebrshipLevelIds   string                       `gorm:"column:memebrship_level_ids"`
	RelatedArticles      string                       `gorm:"column:related_articles"`
	CreatedDate          string                       `gorm:"-:migration;<-:false"`
	ModifiedDate         string                       `gorm:"-:migration;<-:false"`
	Username             string                       `gorm:"<-:false"`
	CategoryGroup        string                       `gorm:"-:migration;<-:false"`
	ChannelName          string                       `gorm:"-:migration;<-:false"`
	Cno                  string                       `gorm:"<-:false"`
	ProfileImagePath     string                       `gorm:"<-:false"`
	EntryStatus          string                       `gorm:"-"`
	TblChannelEntryField []TblChannelEntryField       `gorm:"<-:false; foreignKey:ChannelEntryId"`
	Categories           [][]categories.TblCategories `gorm:"-"`
	AdditionalData       string                       `gorm:"-"`
	AuthorDetail         team.TblUser                 `gorm:"-"`
	Sections             []tblfield                   `gorm:"-"`
	Fields               []tblfield                   `gorm:"-"`
	MemberProfiles       member.TblMemberProfile      `gorm:"-"`
	Feature              int                          `gorm:"column:feature;DEFAULT:0"`
	ViewCount            int                          `gorm:"column:view_count;DEFAULT:0"`
	Author               string                       `gorm:"column:author"`
	SortOrder            int                          `gorm:"column:sort_order"`
	CreateTime           time.Time                    `gorm:"column:create_time;default:null"`
	PublishedTime        time.Time                    `gorm:"column:published_time;default:null"`
	ReadingTime          int                          `gorm:"column:reading_time;DEFAULT:0"`
	Tags                 string                       `gorm:"column:tags"`
	Excerpt              string                       `gorm:"column:excerpt"`
	ImageAltTag          string                       `gorm:"column:image_alt_tag"`
	TenantId             int                          `gorm:"column:tenant_id"`
	Uuid                 string                       `gorm:"column:uuid"`
	ParentId             int                          `gorm:"column:parent_id"`
	ChildrenList         []Tblchannelentries          `gorm:"-"`
	OrderIndex           int                          `gorm:"column:order_index"`
	MembergroupId        string                       `gorm:"type:membergroup_id"`
	FirstName            string                       `gorm:"<-:false"`
	LastName             string                       `gorm:"<-:false"`
	NameString           string                       `gorm:"<-:false"`
	CtaId                int                          `gorm:"column:cta_id"`
}

type Type

type Type string
const (
	Postgres Type = "postgres"
	Mysql    Type = "mysql"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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