db

package
v0.0.0-...-ade4240 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 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 {
	Book_id int       `gorm:"primaryKey; not null" json:"book_id"`
	Name    string    `json:"name" gorm:"not null"`
	Author  string    `json:"author" gorm:"not null"`
	ISBN    int       `json:"isbn" gorm:"not null; unique"`
	AddedOn time.Time `json:"addedon"`
}

Book database Model.

type Borrower

type Borrower struct {
	Book_id   uint `gorm:"foreignKey; not null" json:"book_id"`
	Borrow_id uint `gorm:"primaryKey; not null" json:"borrow_id"`

	Name    string    `json:"name"`
	Author  string    `json:"author"`
	ISBN    int       `json:"isbn" gorm:"unique"`
	AddedOn time.Time `json:"addedon"`

	Borrow_start time.Time `json:"borrow_start" gorm:"not null"`
	Borrow_end   time.Time `json:"borrow_end" gorm:"not null"`
}

Borrower database Model.

Jump to

Keyboard shortcuts

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