Documentation ¶
Overview ¶
短连接服务
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Link ¶
type Link struct { Id uint64 `gorm:"column:id;primaryKey;type:BIGINT UNSIGNED;not null;autoIncrement" json:"id" form:"id"` UserId uint `gorm:"column:user_id;type:INT UNSIGNED;comment:创建人" json:"user_id" form:"user_id"` //创建人 Uri string `gorm:"column:uri;type:VARCHAR(200);comment:源链接信息" json:"uri" form:"uri"` //源链接信息 EndDate string `gorm:"column:end_date;type:DATE;comment:过期时间" json:"end_date" form:"end_date"` //过期时间 Codes string `gorm:"column:codes;type:CHAR(6);index:codes;comment:短链识别码" json:"codes" form:"codes"` //短链识别码 Status uint8 `gorm:"column:status;type:TINYINT UNSIGNED;comment:状态 0-正常 1-禁用" json:"status" form:"status"` //状态 0-正常 1-禁用 IsDeleted uint8 `gorm:"column:is_deleted;type:TINYINT UNSIGNED;comment:是否删除 0-正常 1-删除" json:"is_deleted" form:"is_deleted"` //是否删除 0-正常 1-删除 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"` // 最后更新时间 }
短链接存储表(配置短链接信息)
type LinkBrow ¶
type LinkBrow struct { Id uint64 `gorm:"column:id;primaryKey;type:BIGINT UNSIGNED;not null;autoIncrement" json:"id" form:"id"` UrlId uint64 `gorm:"column:url_id;type:BIGINT UNSIGNED;index:url_id;comment:短链接ID" json:"url_id" form:"url_id"` //短链接ID Ua uint `gorm:"column:ua;type:INT UNSIGNED;comment:UA,关联KV表" json:"ua" form:"ua"` //UA,关联KV表 System uint `gorm:"column:system;type:INT UNSIGNED;comment:系统" json:"system" form:"system"` //系统 Brow uint `gorm:"column:brow;type:INT UNSIGNED;comment:浏览器" json:"brow" form:"brow"` //浏览器 BrowVersion uint `gorm:"column:brow_version;type:INT UNSIGNED;comment:浏览器版本" json:"brow_version" form:"brow_version"` //浏览器版本 CreatedAt string `gorm:"column:created_at;type:DATETIME;comment:浏览时间" json:"created_at" form:"created_at"` // 浏览时间 }
短链接的访问PV记录表
Click to show internal directories.
Click to hide internal directories.