model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliEcsOrder

type AliEcsOrder struct {
	Id                          int    `json:"id" gorm:"primaryKey;int;autoIncrement"`
	RegionId                    string `json:"region_id" gorm:"type:varchar(128);index;not null;comment:实例所属地"`              //实例所属的地域ID
	ImageId                     string `json:"image_id" gorm:"type:varchar(128);not null"`                                   // 镜像ID
	InstanceType                string `json:"instance_type" gorm:"type:varchar(128);not null;comment:资源规格"`                 // 实例的资源规格
	PasswordInherit             bool   `json:"password_inherit"`                                                             //是否使用镜像预设的密码
	AutoRenew                   bool   `json:"auto_renew"`                                                                   //是否自动续费
	AutoReleaseTime             int    `json:"auto_release_time" gorm:"type:int;not null;default:1"`                         // 释放时间
	InstanceChargeType          string `json:"instance_charge_type" gorm:"type:varchar(64);not null;default:PostPaid"`       // 实例计费类型
	AutoPay                     bool   `json:"auto_pay"`                                                                     // 是否自动付费
	InternetChargeType          string `json:"internet_charge_type" gorm:"type:varchar(64);not null;default:PayByBandwidth"` // 网络计费类型
	InternetMaxBandwidth        int32  `json:"internet_max_bandwidth" gorm:"type:int;default:1;not null;"`                   // 公网带宽最大值
	DryRun                      bool   `json:"dry_run"`                                                                      // 预检请求
	SecurityGroupId             string `json:"security_group_id" gorm:"type:varchar(128)"`                                   // 安全组ID
	Password                    string `json:"password" gorm:"type:varchar(32)"`                                             // 密码
	SystemDisk                  Disk   `json:"system_disk" gorm:"type:text;"`                                                // 系统盘
	IoOptimized                 string `json:"io_optimized" gorm:"type:varchar(32)"`                                         // 是否I/O优化
	SecurityEnhancementStrategy string `json:"security_enhancement_strategy" gorm:"type:varchar(32)"`                        // 安全增强
	VSwitchId                   string `json:"v_switch_id" gorm:"type:varchar(128)"`                                         // 交换机ID
	LocalListenAddr             string `json:"local_listen_addr" gorm:"type:varchar(128);not null;default:''"`               // 本地代理监听地址
	ConnectId                   string `json:"connect_id" gorm:"type:varchar(24);index;not null;default:''"`                 //

	OrderStatus int               `json:"order_status" gorm:"type:int;not null;default:-1;index"`        // 订单状态 -1,默认创建,200 创建成功 400 创建失败
	ErrMessage  string            `json:"err_message" gorm:"type:varchar(1024);not null;default:''"`     // 订单失败message
	ErrData     datatypes.JSONMap `json:"err_data" gorm:"type:text;"`                                    // 订单失败数据
	RequestId   string            `json:"request_id" gorm:"type:varchar(128);not null;default:''"`       // 订单请求ID
	OrderId     string            `json:"order_id" gorm:"type:varchar(128);not null;default:''"`         // 订单ID
	TradePrice  float64           `json:"trade_price" gorm:"type:decimal(10,4);not null;default:0.0000"` // 订单成交价
	InstanceId  string            `json:"instance_id" gorm:"type:varchar(128);not null;default:''"`      // 实例ID

	QueryStatus     int               `json:"query_status" gorm:"type:int;not null;default:-1;index"`
	QueryErrMessage string            `json:"query_err_message" gorm:"type:varchar(1024);not null;default:''"`
	QueryErrData    datatypes.JSONMap `json:"query_err_data" gorm:"type:text;"`
	RunStatus       string            `json:"run_status" gorm:"type:varchar(64);not null;default:''"`         // 运行状态
	PublicIpAddress string            `json:"public_ip_address" gorm:"type:varchar(128);not null;default:''"` // 实例IP

	CreateTime dataType.CustomTime `json:"create_time" gorm:"index;not null;type:timestamp;default:current_timestamp"`     // 创建时间
	UpdateTime dataType.CustomTime `json:"update_time" gorm:"index;not null;type:timestamp;default:'0000-00-00 00:00:00'"` // 更新时间
}

func (*AliEcsOrder) TableName

func (a *AliEcsOrder) TableName() string

type Connect

type Connect struct {
	Id         string              `json:"id" gorm:"type:varchar(24);primaryKey"`
	Pid        string              `json:"pid" gorm:"type:varchar(24);index"`
	Lname      string              `json:"lname" gorm:"type:varchar(128);not null;default:'';"`                            // 连接名称
	Saddr      string              `json:"saddr" gorm:"type:varchar(128);not null;default:''"`                             // 目标地址
	User       string              `json:"user" gorm:"type:varchar(128);not null;index"`                                   // 用户
	Stype      types.SSHValidType  `json:"type" gorm:"type:int;not null;default:1"`                                        // 验证方式 1、密码验证 2、密钥验证
	Passwd     string              `json:"passwd" gorm:"type:text;not null;default:''"`                                    // 密码、密钥路径
	Remote     string              `json:"remote" gorm:"type:varchar(128);not null;default:''"`                            // 远程地址
	Listen     string              `json:"listen" gorm:"type:varchar(128);not null;default:''"`                            // 本地监听地址
	Connect    types.ForwardType   `json:"connect" gorm:"type:varchar(128);not null;default:''"`                           // 连接类型 L 本地转发 R 远程转发 D 动态转发 H HTTP代理
	Active     types.TextStatus    `json:"active" gorm:"type:char(1);index;not null;default:'Y'"`                          // 是否启用
	CreateTime dataType.CustomTime `json:"create_time" gorm:"index;not null;type:timestamp;default:current_timestamp"`     // 创建时间
	UpdateTime dataType.CustomTime `json:"update_time" gorm:"index;not null;type:timestamp;default:'0000-00-00 00:00:00'"` // 更新时间
	Son        []Connect           `json:"son" gorm:"-:all"`                                                               // 子连接
}

func (*Connect) Db2Connect

func (c *Connect) Db2Connect() Connect

func (*Connect) TableName

func (c *Connect) TableName() string

type Disk

type Disk struct {
	Category string `json:"category"` // 系统盘类型
	Size     int32  `json:"size"`     // 系统盘大小
}

func (Disk) GormDBDataType

func (Disk) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (Disk) GormDataType

func (d Disk) GormDataType() string

GormDataType gorm common data type

func (*Disk) Scan

func (d *Disk) Scan(value any) error

func (Disk) Value

func (d Disk) Value() (driver.Value, error)

type SysConfig

type SysConfig struct {
	Prop       string              `json:"prop" gorm:"primaryKey;type:varchar(128)"`
	Label      string              `json:"label" gorm:"type:varchar(128);not null"`
	Value      string              `json:"value" gorm:"type:text;not null;default:''"`
	Name       string              `json:"name" gorm:"type:varchar(128);not null;default:'el-input'"`
	Type       string              `json:"type" gorm:"type:varchar(128);not null;default:'text'"`
	Component  datatypes.JSONMap   `json:"component" gorm:"type:text"`
	CreateTime dataType.CustomTime `json:"create_time" gorm:"index;not null;type:timestamp;default:current_timestamp"`     // 创建时间
	UpdateTime dataType.CustomTime `json:"update_time" gorm:"index;not null;type:timestamp;default:'0000-00-00 00:00:00'"` // 更新时间
}

func (*SysConfig) TableName

func (c *SysConfig) TableName() string

Jump to

Keyboard shortcuts

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