model

package
v0.0.0-...-0025a43 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Media

type Media struct {
	ID       uint64 `gorm:"primaryKey"`
	DiskType string `gorm:"size:20;index;not null;comment:存储类型"`
	SrcType  int8   `gorm:"not null;comment:链接类型 1相对路径 2外链"`
	Src      string `gorm:"not null;comment:资源链接"`
	Timestamps
}

func (*Media) ToDomain

func (m *Media) ToDomain() *domain.Media

type SoftDeletes

type SoftDeletes struct {
	DeletedAt gorm.DeletedAt `gorm:"index;column:deleted_at"`
}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time `gorm:"column:created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at"`
}

type User

type User struct {
	ID       uint64 `gorm:"primaryKey"`
	Name     string `gorm:"size:30;not null;comment:用户名称"`
	Mobile   string `gorm:"size:24;not null;index;comment:用户手机号"`
	Password string `gorm:"not null;default:'';comment:用户密码"`
	Timestamps
	SoftDeletes
}

func (*User) ToDomain

func (m *User) ToDomain() *domain.User

Jump to

Keyboard shortcuts

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