Documentation ¶
Overview ¶
Banner模块
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Banner ¶
type Banner struct { Id uint64 `gorm:"column:id;primary_key;type:BIGINT UNSIGNED;not null;autoIncrement" json:"id" form:"id"` Title string `gorm:"column:title;type:VARCHAR(200);comment:Banner标题" json:"title" form:"title"` // Banner标题 Fid uint `gorm:"column:fid;comment:文件ID" json:"fid" form:"fid"` // Banner图片信息 Href string `` // Banner跳转地址 /* 151-byte string literal not displayed */ Dervice uint8 `gorm:"column:dervice;type:TINYINT UNSIGNED;comment:Banner所属设备类型" json:"dervice" form:"dervice"` // 设备类型 Type uint8 `gorm:"column:type;type:TINYINT UNSIGNED;comment:Banner所属设备位置" json:"type" form:"type"` // Banner位置 Order uint8 `gorm:"column:order;type:TINYINT UNSIGNED;comment:Banner排序,数字越大排序越靠前" json:"order" form:"order"` // 排序,数字越大排序越靠前,最大200 IsTarget uint8 `gorm:"column:is_target;type:TINYINT UNSIGNED;comment:是否新窗口打开 0-否 1-是" json:"is_target" form:"is_target"` // 是否新窗口打开,0否1是 IsDeleted uint8 `gorm:"column:is_deleted;type:TINYINT UNSIGNED;comment:是否删除 0-否 1-是" json:"is_deleted" form:"is_deleted"` // 是否删除 0-否 1-是 UserId uint `gorm:"column:user_id;comment:Banner创建人" json:"user_id" form:"user_id"` // 创建人ID CreatedAt string `gorm:"column:created_at;type:DATETIME;comment:创建时间" json:"created_at" form:"created_at"` // 创建时间 UpdatedAt string `gorm:"column:updated_at;type:DATETIME;comment:最后修改时间" json:"updated_at" form:"updated_at"` // 更新时间 }
配置通用Banner信息
type Config ¶
type Config struct { DB *gorm.DB BannerName string // Banner表存储名称 DerviceMap []DerviceMap // 设备类型列表/索引 }
配置信息
type DerviceMap ¶
type DerviceMap struct { Id uint8 `json:"id"` // 索引值 Name string `json:"name"` // 名称 Child []DerviceMap `json:"child"` // 子索引 }
设备索引标识
Click to show internal directories.
Click to hide internal directories.