models

package
v0.0.0-...-741f16f Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 3 Imported by: 10

Documentation

Overview

Package models contains application specific entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	ID        int       `bun:"id,pk,autoincrement" json:"-"`
	AccountID int       `bun:"account_id,notnull" json:"-"`
	UpdatedAt time.Time `bun:"updated_at,nullzero,notnull,default:current_timestamp" json:"updated_at,omitempty"`

	Theme string `bun:"theme" json:"theme,omitempty"`
}

Profile holds specific application settings linked to an Account.

func (*Profile) BeforeInsert

func (p *Profile) BeforeInsert(db *bun.DB) error

BeforeInsert hook executed before database insert operation.

func (*Profile) BeforeUpdate

func (p *Profile) BeforeUpdate(db *bun.DB) error

BeforeUpdate hook executed before database update operation.

func (*Profile) Validate

func (p *Profile) Validate() error

Validate validates Profile struct and returns validation errors.

Jump to

Keyboard shortcuts

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