Documentation ¶
Index ¶
- Variables
- type BaseModel
- type Something
- func (m *Something) ColumnCode() (string, interface{})
- func (m *Something) ColumnCreatedAt() (string, interface{})
- func (m *Something) ColumnDeletedAt() (string, interface{})
- func (m *Something) ColumnID() (string, interface{})
- func (m *Something) ColumnUpdatedAt() (string, interface{})
- func (m *Something) ColumnUserID() (string, interface{})
- type User
- func (m *User) ColumnBirth() (string, interface{})
- func (m *User) ColumnCode() (string, interface{})
- func (m *User) ColumnCreatedAt() (string, interface{})
- func (m *User) ColumnDeletedAt() (string, interface{})
- func (m *User) ColumnEmail() (string, interface{})
- func (m *User) ColumnFirstName() (string, interface{})
- func (m *User) ColumnID() (string, interface{})
- func (m *User) ColumnLastName() (string, interface{})
- func (m *User) ColumnPhone() (string, interface{})
- func (m *User) ColumnUpdatedAt() (string, interface{})
- type UserWithHooks
- func (p *UserWithHooks) BeforeCreateOrUpdate() map[string]interface{}
- func (m *UserWithHooks) ColumnCreatedAt() (string, interface{})
- func (m *UserWithHooks) ColumnDeletedAt() (string, interface{})
- func (m *UserWithHooks) ColumnFirstName() (string, interface{})
- func (m *UserWithHooks) ColumnID() (string, interface{})
- func (m *UserWithHooks) ColumnLastName() (string, interface{})
- func (m *UserWithHooks) ColumnName() (string, interface{})
- func (m *UserWithHooks) ColumnUpdatedAt() (string, interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var AllTestModels = []interface{}{ new(User), new(Something), new(UserWithHooks), }
View Source
var Columns struct { User struct { ID string CreatedAt string UpdatedAt string DeletedAt string Birth string Email string FirstName string LastName string Phone string Code string } Something struct { ID string CreatedAt string UpdatedAt string DeletedAt string UserID string Code string } UserWithHooks struct { ID string CreatedAt string UpdatedAt string DeletedAt string FirstName string LastName string Name string } }
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { ID uuid.UUID `gorm:"type:uuid;primary_key;"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
func (*BaseModel) GenerateID ¶
func (bm *BaseModel) GenerateID()
type Something ¶
func (*Something) ColumnCode ¶
func (*Something) ColumnCreatedAt ¶
func (*Something) ColumnDeletedAt ¶
func (*Something) ColumnUpdatedAt ¶
func (*Something) ColumnUserID ¶
type User ¶
type User struct { BaseModel Birth time.Time Email string FirstName string `gorm:"column:name"` LastName string Phone string Code int }
func (*User) ColumnBirth ¶
func (*User) ColumnCode ¶
func (*User) ColumnCreatedAt ¶
func (*User) ColumnDeletedAt ¶
func (*User) ColumnEmail ¶
func (*User) ColumnFirstName ¶
func (*User) ColumnLastName ¶
func (*User) ColumnPhone ¶
func (*User) ColumnUpdatedAt ¶
type UserWithHooks ¶
func (*UserWithHooks) BeforeCreateOrUpdate ¶
func (p *UserWithHooks) BeforeCreateOrUpdate() map[string]interface{}
func (*UserWithHooks) ColumnCreatedAt ¶
func (m *UserWithHooks) ColumnCreatedAt() (string, interface{})
func (*UserWithHooks) ColumnDeletedAt ¶
func (m *UserWithHooks) ColumnDeletedAt() (string, interface{})
func (*UserWithHooks) ColumnFirstName ¶
func (m *UserWithHooks) ColumnFirstName() (string, interface{})
func (*UserWithHooks) ColumnID ¶
func (m *UserWithHooks) ColumnID() (string, interface{})
func (*UserWithHooks) ColumnLastName ¶
func (m *UserWithHooks) ColumnLastName() (string, interface{})
func (*UserWithHooks) ColumnName ¶
func (m *UserWithHooks) ColumnName() (string, interface{})
func (*UserWithHooks) ColumnUpdatedAt ¶
func (m *UserWithHooks) ColumnUpdatedAt() (string, interface{})
Click to show internal directories.
Click to hide internal directories.