entitymodels

package
v0.0.0-...-be30c67 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserModel

type UserModel struct {
	entityuser.UserEntity
	Password string `db:"password" json:"-"`
}

func (*UserModel) Datasource

func (u *UserModel) Datasource() sharedcrud.DatasourceType

func (*UserModel) TableName

func (u *UserModel) TableName() string

func (*UserModel) ToEntity

func (u *UserModel) ToEntity() *entityuser.UserEntity

type UserPermissionModel

type UserPermissionModel struct {
	ID         uint      `gorm:"primary_key"`
	UserId     uint      `gorm:"index"`
	User       UserModel `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"user"`
	Permission string    `json:"permission"` // You can edit this field
	UpdatedAt  time.Time `db:"updated_at" json:"updated_at"`
}

func (*UserPermissionModel) Datasource

func (*UserPermissionModel) TableName

func (u *UserPermissionModel) TableName() string

type UserTokenModel

type UserTokenModel struct {
	ID        uint      `gorm:"primary_key"`
	UserId    uint      `gorm:"index"`
	User      UserModel `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" json:"user"`
	Access    string    `json:"access"`
	Refresh   string    `json:"refresh"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}

func (*UserTokenModel) Datasource

func (u *UserTokenModel) Datasource() sharedcrud.DatasourceType

func (*UserTokenModel) TableName

func (u *UserTokenModel) TableName() string

Jump to

Keyboard shortcuts

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