models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-gomeet-service. DO NOT EDIT. source: pb/profile.proto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDevicePhysically

func DeleteDevicePhysically(db *gorm.DB, sUuid string) error

DeleteDevicePhysically performs the physical deletion of the device with the specified ID.

func MigrateSchema

func MigrateSchema(dsn string) error

Types

type Profile

type Profile struct {
	UUID      uuid.UUID `gorm:"primary_key;type:char(36);not null"`
	Gender    uint16
	Email     string    `gorm:"type:varchar(100);unique_index"`
	Name      string    `gorm:"size:255"`
	Birthday  time.Time `gorm:"type:date;"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

Profile is the GORM model definition.

func CreateProfile

func CreateProfile(db *gorm.DB, gender uint16, email, name, birthday string) (*Profile, error)

CreateDevice inserts a new profile in the table.

func DeleteProfileLogically

func DeleteProfileLogically(db *gorm.DB, sUuid string) (*Profile, error)

DeleteProfileLogically performs the logical deletion of the profile with the specified ID.

func FindProfileByUUID

func FindProfileByUUID(db *gorm.DB, sUuid string) (*Profile, error)

FindProfileByUUID returns the existing profile with the specified UUID.

func ListProfiles

func ListProfiles(db *gorm.DB, offset uint, limit uint, order string, criteria map[string]interface{}, excludeSoftDeleted bool, softDeletedOnly bool) ([]Profile, uint, bool, error)

ListProfiles returns a list of profiles matching a set of criteria.

func UpdateProfile

func UpdateProfile(db *gorm.DB, sUuid string, gender uint16, email, name, birthday string) (*Profile, error)

UpdateProfile updates the existing profile with the specified UUID using the modifications provided in the map argument.

func (*Profile) BeforeCreate

func (*Profile) BeforeCreate(scope *gorm.Scope) error

Jump to

Keyboard shortcuts

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