Giter Site home page Giter Site logo

librarymanagementsystem's Introduction

LibraryManagementSystem

A toy library management system, the lab 5 of ZJU Database Concept System course.

Backend

Use Golang as the backend language.

Database Driver Web Framework Log Manager Config Manager
database/sql labstack/echo sirupsen/logrus spf13/viper

Code Structure

app

Model for the library management system and one implement with MySQL as the data storage. Any type that implement the following methods can be a possible library management system.

type LibraryManagementSystem interface {
	Init() error
	Free()

	StoreBook(*model.Book) *ApiResult
	IncBookStock(bookId int, deltaStock int) *ApiResult
	StoreBooks([]model.Book) *ApiResult
	RemoveBook(bookId int) *ApiResult
	ModifyBookInfo(*model.Book) *ApiResult
	QueryBook(*model.BookQueryConditions) *ApiResult
	BorrowBook(*model.Borrow) *ApiResult
	ReturnBook(*model.Borrow) *ApiResult
	ShowBorrowHistory(cardId int) *ApiResult
	RegisterCard(*model.Card) *ApiResult
	QueryCard(cardId int) *ApiResult
	RemoveCard(cardId int) *ApiResult
	ShowCards() *ApiResult
	ResetDatabase() *ApiResult
}

conf

Manage configurations. Load conf.yaml file and provide MySQL login info to database connector.

model

Models for book, card and borrow record and functions to handle database.

utils

Utilities. Currently contains http response errors and string_to_snake function.

web

Use echo to implement http api for library operation.

Frontend

Use Vue as the frontend language. Just learned for this lab so the code quality is poor :(

Use Naive-UI as the component library.

librarymanagementsystem's People

Contributors

yasyakarasu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.