model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameNeedNode = "need_nodes"
View Source
const TableNameWebHook = "web_hooks"
View Source
const TableNameWebHookCondition = "web_hook_conditions"

Variables

This section is empty.

Functions

This section is empty.

Types

type NeedNode

type NeedNode struct {
	ID           int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CreatedAt    *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt    *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	NodeName     string         `gorm:"column:node_name;not null;comment:需要订阅的节点名称" json:"node_name"`            // 需要订阅的节点名称
	WebHookRefer *int64         `gorm:"column:web_hook_refer;comment:WebHook foreign key" json:"web_hook_refer"` // WebHook foreign key
}

NeedNode mapped from table <need_nodes>

func (*NeedNode) TableName

func (*NeedNode) TableName() string

TableName NeedNode's table name

type WebHook

type WebHook struct {
	ID                    int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CreatedAt             *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt             *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt             gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	Name                  string         `gorm:"column:name;not null;comment:webhook名称" json:"name"`                                                   // webhook名称
	URL                   string         `gorm:"column:url;not null;comment:url地址" json:"url"`                                                         // url地址
	Active                *bool          `gorm:"column:active;default:true;comment:是否激活" json:"active"`                                                // 是否激活
	WebHookConditionRefer *int64         `gorm:"column:web_hook_condition_refer;comment:WebHookCondition foreign key" json:"web_hook_condition_refer"` // WebHookCondition foreign key
}

WebHook mapped from table <web_hooks>

func (*WebHook) TableName

func (*WebHook) TableName() string

TableName WebHook's table name

type WebHookCondition

type WebHookCondition struct {
	ID        int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CreatedAt *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	Condition string         `gorm:"column:condition;not null;comment:条件表达式" json:"condition"` // 条件表达式
	WebHooks  []WebHook      `gorm:"foreignKey:WebHookConditionRefer;references:ID" json:"web_hooks"`
}

WebHookCondition mapped from table <web_hook_conditions>

func (*WebHookCondition) TableName

func (*WebHookCondition) TableName() string

TableName WebHookCondition's table name

Jump to

Keyboard shortcuts

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