entity

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	ID        int64     `column:"id" option:"pk" json:"id"`
	Title     string    `column:"title" json:"title" validate:"required"`
	Author    string    `column:"author" json:"author" validate:"required"`
	UpdatedAt time.Time `column:"updated_at" option:"now" json:"update_at"`
	CreatedAt time.Time `column:"created_at" option:"now,no_update" json:"created_at"`
}

Book represented book model @entity (table:"books" dialect:"postgres" ctor_db:"pg")

type Song

type Song struct {
	ID        int64     `column:"id" option:"pk" json:"id"`
	Title     string    `column:"title" json:"title" validate:"required"`
	Artist    string    `column:"artist" json:"artist" validate:"required"`
	UpdatedAt time.Time `column:"updated_at" option:"now" json:"update_at"`
	CreatedAt time.Time `column:"created_at" option:"now,no_update" json:"created_at"`
}

Song entity @entity (table:"songs" dialect:"mysql" ctor_db:"mysql")

Jump to

Keyboard shortcuts

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