models

package
v0.0.0-...-4bd82ba Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank struct {
	ID          uint `gorm:"primaryKey"`
	Name        string
	DisplayName string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func (Bank) ToEntity

func (b Bank) ToEntity() (*entities.Bank, error)

type OauthAccessToken

type OauthAccessToken struct {
	ID        uuid.UUID      `json:"id" gorm:"type:uuid;default:uuid_generate_v4();primaryKey"`
	ClientId  uuid.UUID      `json:"client_id" gorm:"type:uuid;primaryKey;column:client_id"`
	UserId    *uuid.UUID     `json:"user_id" gorm:"type:uuid;column:user_id"`
	GrantType string         `json:"grant_type" gorm:"column:grant_type"`
	Scopes    pq.StringArray `json:"scopes" gorm:"type:varchar(100)[];column:scopes"`
	CreatedAt time.Time      `json:"created_at" gorm:"column:created_at"`
	UpdatedAt time.Time      `json:"updated_at" gorm:"column:updated_at"`
	ExpiresAt time.Time      `json:"expires_at" gorm:"column:expires_at"`
	DeletedAt *time.Time     `json:"revoked_at" gorm:"column:deleted_at"`
}

func CreateModelFromEntityOauthAccessToken

func CreateModelFromEntityOauthAccessToken(entity domainModelEntities.OauthAccessToken) *OauthAccessToken

func (*OauthAccessToken) BeforeCreate

func (o *OauthAccessToken) BeforeCreate(db *gorm.DB) (err error)

func (*OauthAccessToken) ToEntity

type OauthClient

type OauthClient struct {
	ID               uuid.UUID      `json:"id" gorm:"type:uuid;primaryKey;column:id;default:uuid_generate_v4()"`
	Name             string         `json:"name" gorm:"column:name"`
	EnabledGrantType pq.StringArray `json:"enabled_grant_type" gorm:"type:varchar(100)[];column:enabled_grant_type"`
	Secret           string         `json:"secret" gorm:"column:secret"`
	Redirect         string         `json:"redirect" gorm:"column:redirect"`
	CreatedAt        *time.Time     `json:"created_at" gorm:"column:created_at"`
	UpdatedAt        *time.Time     `json:"updated_at" gorm:"column:updated_at"`
	DeletedAt        gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at"`
}

func (*OauthClient) ToEntity

func (oauthClient *OauthClient) ToEntity() (*entities.OauthClient, errors.DomainError)

type User

type User struct {
	ID        string    `json:"id" gorm:"column:id,primaryKey"`
	Username  string    `json:"username" gorm:"column:username"`
	Password  string    `json:"password" gorm:"column:password"`
	CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
	UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
	DeletedAt time.Time `json:"deleted_at" gorm:"column:deleted_at"`
}

func (*User) TableName

func (m *User) TableName() string

func (*User) ToEntity

func (m *User) ToEntity() (*entities.User, error)

Jump to

Keyboard shortcuts

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