model

package
v1.0.101 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectSysShorturl

func InjectSysShorturl(s *SysShorturl)

func LoadSysShorturl

func LoadSysShorturl() baseiface.ISingleton

Types

type SysShorturl

type SysShorturl struct {
	basedto.BaseEntity `gorm:"-"`

	/*    */
	Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*  编码  */
	Code string `gorm:"column:code;type:varchar(12);comment:'编码'" json:"code"`
	/*  名称  */
	Name string `gorm:"column:name;type:varchar(128);comment:'名称'" json:"name"`
	/*  地址  */
	Url string `gorm:"column:url;type:varchar(250);comment:'地址'" json:"url"`
	/*  短链地址  */
	ShortUrl string `gorm:"column:short_url;type:varchar(250);comment:'短链地址'" json:"short_url"`
	/*  状态  */
	Status int32 `gorm:"column:status;type:int(11);comment:'状态'" json:"status"`
	/*  备注  */
	Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"`
	/*    */
	CreatedAt time.Time `gorm:"column:created_at;type:datetime;comment:''" json:"created_at"`
	/*    */
	OpOn time.Time `gorm:"column:op_on;type:datetime;comment:''" json:"op_on"`
	/*    */
	ExpireDate time.Time `gorm:"column:expire_date;type:datetime;comment:''" json:"expire_date"`
	/*    */
	UserId int32 `gorm:"column:user_id;type:int(11);comment:''" json:"user_id"`
}

func FindBeanSysShorturl

func FindBeanSysShorturl() *SysShorturl

func NewSysShorturl

func NewSysShorturl() *SysShorturl

func (*SysShorturl) AutoMigrate

func (entity *SysShorturl) AutoMigrate(db *gorm.DB) error

迁移

func (*SysShorturl) String

func (entity *SysShorturl) String() string

指定生成结果转json字符串

func (*SysShorturl) TableName

func (entity *SysShorturl) TableName() string

gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!

func (*SysShorturl) ToString

func (entity *SysShorturl) ToString() string

func (*SysShorturl) Unmarshal

func (entity *SysShorturl) Unmarshal(body string) error

func (*SysShorturl) UnmarshalBy

func (entity *SysShorturl) UnmarshalBy(body []byte) error

type SysShorturlEntity

type SysShorturlEntity struct {

	/*    */
	Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*  编码  */
	Code string `gorm:"column:code;type:varchar(12);comment:'编码'" json:"code"`
	/*  名称  */
	Name string `gorm:"column:name;type:varchar(128);comment:'名称'" json:"name"`
	/*  地址  */
	Url string `gorm:"column:url;type:varchar(250);comment:'地址'" json:"url"`
	/*  短链地址  */
	ShortUrl string `gorm:"column:short_url;type:varchar(250);comment:'短链地址'" json:"short_url"`
	/*  状态  */
	Status int32 `gorm:"column:status;type:int(11);comment:'状态'" json:"status"`
	/*  备注  */
	Remark string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"`
	/*    */
	CreatedAt int64 `gorm:"column:created_at;type:datetime;comment:''" json:"created_at,string"`
	/*    */
	OpOn int64 `gorm:"column:op_on;type:datetime;comment:''" json:"op_on,string"`
	/*    */
	ExpireDate int64 `gorm:"column:expire_date;type:datetime;comment:''" json:"expire_date,string"`
	/*    */
	UserId int32 `gorm:"column:user_id;type:int(11);comment:''" json:"user_id"`
}

type SysShorturlParams

type SysShorturlParams struct {

	/*    */
	Id *int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*  编码  */
	Code *string `gorm:"column:code;type:varchar(12);comment:'编码'" json:"code"`
	/*  名称  */
	Name *string `gorm:"column:name;type:varchar(128);comment:'名称'" json:"name"`
	/*  地址  */
	Url *string `gorm:"column:url;type:varchar(250);comment:'地址'" json:"url"`
	/*  短链地址  */
	ShortUrl *string `gorm:"column:short_url;type:varchar(250);comment:'短链地址'" json:"short_url"`
	/*  状态  */
	Status *int32 `gorm:"column:status;type:int(11);comment:'状态'" json:"status"`
	/*  备注  */
	Remark *string `gorm:"column:remark;type:varchar(500);comment:'备注'" json:"remark"`
	/*    */
	CreatedAt *time.Time `gorm:"column:created_at;type:datetime;comment:''" json:"created_at"`
	/*    */
	OpOn *time.Time `gorm:"column:op_on;type:datetime;comment:''" json:"op_on"`
	/*    */
	ExpireDate *time.Time `gorm:"column:expire_date;type:datetime;comment:''" json:"expire_date"`
	/*    */
	UserId *int32 `gorm:"column:user_id;type:int(11);comment:''" json:"user_id"`
}

Jump to

Keyboard shortcuts

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