models

package
v0.8.37 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginData

type LoginData struct {
	Token  string      `json:"token"`
	Path   string      `json:"path"`
	OAuth  bool        `json:"oauth"`
	Status bool        `json:"status"`
	Data   interface{} `json:"data"`
}

type PASSWORDRESETSOracle

type PASSWORDRESETSOracle struct {
	Token     string    `gorm:"column:TOKEN;not null;" json:"token"`
	Wrong     int       `gorm:"column:WRONG;not null;" json:"wrong"`
	Email     string    `gorm:"column:EMAIL;primaryKey;" json:"email"`
	CreatedAt time.Time `gorm:"column:CREATED_AT" json:"created_at"`
}

func (*PASSWORDRESETSOracle) TableName

func (v *PASSWORDRESETSOracle) TableName() string

TableName sets the insert table name for this struct type

type PasswordReset

type PasswordReset struct {
	Token     string    `gorm:"column:token;not null;" json:"token"`
	Wrong     int       `gorm:"column:wrong;not null;" json:"wrong"`
	Email     string    `gorm:"column:email;primaryKey;" json:"email"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
}

func (*PasswordReset) TableName

func (v *PasswordReset) TableName() string

TableName sets the insert table name for this struct type

type PermissionData

type PermissionData struct {
	C      bool   `json:"c"`
	D      bool   `json:"d"`
	MenuID string `json:"menu_id"`
	R      bool   `json:"r"`
	Show   bool   `json:"show"`
	Title  string `json:"title"`
	U      bool   `json:"u"`
}

type Permissions

type Permissions struct {
	DefaultMenu string `json:"default_menu"`
	Extra       struct {
		Chart       bool `json:"chart"`
		Datasourcce bool `json:"datasourcce"`
		Datasource  bool `json:"datasource"`
		Moqup       bool `json:"moqup"`
	} `json:"extra"`
	MenuID      int                       `json:"menu_id"`
	Permissions map[string]PermissionData `json:"permissions"`
}

type Role

type Role struct {
	ID          int            `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Name        string         `gorm:"column:name;not null;unique" json:"name"`
	DisplayName string         `gorm:"column:display_name" json:"display_name"`
	Description string         `gorm:"column:description" json:"description"`
	Permissions string         `gorm:"column:permissions;type:TEXT" json:"permissions"`
	Extra       string         `gorm:"column:extra;type:TEXT" json:"extra"`
	Menu        string         `gorm:"column:menu" json:"menu"`
	CreatedAt   *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt   *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
}

func (*Role) TableName

func (v *Role) TableName() string

TableName sets the insert table name for this struct type

type RoleOracle

type RoleOracle struct {
	ID          int            `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	Description string         `gorm:"column:DESCRIPTION" json:"description"`
	DisplayName string         `gorm:"column:DISPLAY_NAME" json:"display_name"`
	Extra       string         `gorm:"column:EXTRA" json:"extra"`
	Menu        *string        `gorm:"column:MENU" json:"menu"`
	Name        string         `gorm:"column:NAME" json:"name"`
	Permissions string         `gorm:"column:PERMISSIONS;type:LONG" json:"permissions"`
	CreatedAt   *time.Time     `gorm:"column:CREATED_AT" json:"created_at"`
	UpdatedAt   *time.Time     `gorm:"column:UPDATED_AT" json:"updated_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:DELETED_AT" json:"-"`
}

func (*RoleOracle) TableName

func (v *RoleOracle) TableName() string

TableName sets the insert table name for this struct type

type USERSOracle

type USERSOracle struct {
	ID             int64          `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	Avatar         *string        `gorm:"column:AVATAR" json:"avatar"`
	Bio            *string        `gorm:"column:BIO" json:"bio"`
	Birthday       time.Time      `gorm:"column:BIRTHDAY;type:DATE" json:"birthday"`
	Email          string         `gorm:"column:EMAIL" json:"email"`
	FirstName      string         `gorm:"column:FIRST_NAME" json:"first_name"`
	Gender         string         `gorm:"column:GENDER" json:"gender"`
	LastName       *string        `gorm:"column:LAST_NAME" json:"last_name"`
	Login          string         `gorm:"column:LOGIN" json:"login"`
	Password       string         `gorm:"column:PASSWORD" json:"password"`
	Phone          *string        `gorm:"column:PHONE" json:"phone"`
	RegisterNumber string         `gorm:"column:REGISTER_NUMBER" json:"register_number"`
	Role           int64          `gorm:"column:ROLE" json:"role"`
	Status         string         `gorm:"column:STATUS" json:"status"`
	CreatedAt      *time.Time     `gorm:"column:CREATED_AT" json:"created_at"`
	UpdatedAt      *time.Time     `gorm:"column:UPDATED_AT" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:DELETED_AT" json:"-"`
}

func (*USERSOracle) TableName

func (v *USERSOracle) TableName() string

TableName sets the insert table name for this struct type

type Unauthorized

type Unauthorized struct {
	Error  string `json:"error"`
	Status bool   `json:"status"`
}

type User

type User struct {
	ID             int64          `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Status         string         `gorm:"column:status;" json:"status"` //type:ENUM('0','1','2')
	Role           int64          `gorm:"column:role" json:"role"`
	Login          string         `gorm:"column:login;unique_index;not null;unique" json:"login"`
	Email          string         `gorm:"column:email;unique_index;not null;unique" json:"email"`
	RegisterNumber string         `gorm:"column:register_number;not null;unique" json:"register_number"`
	Avatar         string         `gorm:"column:avatar;type:TEXT" json:"avatar"`
	Bio            string         `gorm:"column:bio;type:TEXT" json:"bio"`
	FirstName      string         `gorm:"column:first_name" json:"first_name"`
	LastName       string         `gorm:"column:last_name" json:"last_name"`
	Birthday       time.Time      `gorm:"column:birthday;type:DATE" json:"birthday"`
	Phone          string         `gorm:"column:phone" json:"phone"`
	Gender         string         `gorm:"column:gender;" json:"gender"` //type:ENUM('f','m')
	Password       string         `gorm:"column:password;not null" json:"password"`
	CreatedAt      *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt      *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
}

func (*User) TableName

func (v *User) TableName() string

TableName sets the insert table name for this struct type

type UserUUID

type UserUUID struct {
	ID             string     `gorm:"column:id;primaryKey;type:varchar;default:gen_random_uuid()" json:"id"`
	CreatedAt      *time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt      *time.Time `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt      *time.Time `gorm:"column:deleted_at" json:"-"`
	Status         string     `gorm:"column:status;" json:"status"` //type:ENUM('0','1','2')
	Role           int64      `gorm:"column:role" json:"role"`
	Login          string     `gorm:"column:login;unique_index;not null;unique" json:"login"`
	Email          string     `gorm:"column:email;unique_index;not null;unique" json:"email"`
	RegisterNumber string     `gorm:"column:register_number;not null;unique" json:"register_number"`
	Avatar         string     `gorm:"column:avatar;type:TEXT" json:"avatar"`
	Bio            string     `gorm:"column:bio;type:TEXT" json:"bio"`
	FirstName      string     `gorm:"column:first_name" json:"first_name"`
	LastName       string     `gorm:"column:last_name" json:"last_name"`
	Birthday       time.Time  `gorm:"column:birthday;type:DATE" json:"birthday"`
	Phone          string     `gorm:"column:phone" json:"phone"`
	Gender         string     `gorm:"column:gender;" json:"gender"` //type:ENUM('f','m')
	Password       string     `gorm:"column:password;not null" json:"password"`
}

func (*UserUUID) TableName

func (v *UserUUID) TableName() string

TableName sets the insert table name for this struct type

type UserWithoutPassword

type UserWithoutPassword struct {
	ID             int64          `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Status         string         `gorm:"column:status;" json:"status"` //type:ENUM('0','1','2')
	Role           int64          `gorm:"column:role" json:"role"`
	Login          string         `gorm:"column:login;unique_index;not null;unique" json:"login"`
	Email          string         `gorm:"column:email;unique_index;not null;unique" json:"email"`
	RegisterNumber string         `gorm:"column:register_number;not null;unique" json:"register_number"`
	Avatar         string         `gorm:"column:avatar;type:TEXT" json:"avatar"`
	Bio            string         `gorm:"column:bio;type:TEXT" json:"bio"`
	FirstName      string         `gorm:"column:first_name" json:"first_name"`
	LastName       string         `gorm:"column:last_name" json:"last_name"`
	Birthday       time.Time      `gorm:"column:birthday;type:DATE" json:"birthday"`
	Phone          string         `gorm:"column:phone" json:"phone"`
	Gender         string         `gorm:"column:gender;" json:"gender"` //type:ENUM('f','m')
	CreatedAt      *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt      *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
}

func (*UserWithoutPassword) TableName

func (v *UserWithoutPassword) TableName() string

TableName sets the insert table name for this struct type

type UserWithoutPasswordOracle

type UserWithoutPasswordOracle struct {
	ID             int64          `gorm:"column:ID;primaryKey;autoIncrement" json:"id"`
	Avatar         *string        `gorm:"column:AVATAR" json:"avatar"`
	Bio            *string        `gorm:"column:BIO" json:"bio"`
	Birthday       time.Time      `gorm:"column:BIRTHDAY;type:DATE" json:"birthday"`
	Email          string         `gorm:"column:EMAIL" json:"email"`
	FirstName      *string        `gorm:"column:FIRST_NAME" json:"first_name"`
	Gender         string         `gorm:"column:GENDER" json:"gender"`
	LastName       *string        `gorm:"column:LAST_NAME" json:"last_name"`
	Login          string         `gorm:"column:LOGIN" json:"login"`
	Phone          *string        `gorm:"column:PHONE" json:"phone"`
	RegisterNumber string         `gorm:"column:REGISTER_NUMBER" json:"register_number"`
	Role           int64          `gorm:"column:ROLE" json:"role"`
	Status         string         `gorm:"column:STATUS" json:"status"`
	CreatedAt      *time.Time     `gorm:"column:CREATED_AT" json:"created_at"`
	UpdatedAt      *time.Time     `gorm:"column:UPDATED_AT" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:DELETED_AT" json:"-"`
}

func (*UserWithoutPasswordOracle) TableName

func (v *UserWithoutPasswordOracle) TableName() string

TableName sets the insert table name for this struct type

type UserWithoutPasswordUUID

type UserWithoutPasswordUUID struct {
	ID             string         `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
	Status         string         `gorm:"column:status;" json:"status"` //type:ENUM('0','1','2')
	Role           int64          `gorm:"column:role" json:"role"`
	Login          string         `gorm:"column:login;unique_index;not null;unique" json:"login"`
	Email          string         `gorm:"column:email;unique_index;not null;unique" json:"email"`
	RegisterNumber string         `gorm:"column:register_number;not null;unique" json:"register_number"`
	Avatar         string         `gorm:"column:avatar;type:TEXT" json:"avatar"`
	Bio            string         `gorm:"column:bio;type:TEXT" json:"bio"`
	FirstName      string         `gorm:"column:first_name" json:"first_name"`
	LastName       string         `gorm:"column:last_name" json:"last_name"`
	Birthday       time.Time      `gorm:"column:birthday;type:DATE" json:"birthday"`
	Phone          string         `gorm:"column:phone" json:"phone"`
	Gender         string         `gorm:"column:gender;" json:"gender"` //type:ENUM('f','m')
	CreatedAt      *time.Time     `gorm:"column:created_at" json:"created_at"`
	UpdatedAt      *time.Time     `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
}

func (*UserWithoutPasswordUUID) TableName

func (v *UserWithoutPasswordUUID) TableName() string

TableName sets the insert table name for this struct type

Jump to

Keyboard shortcuts

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