models

package
v0.0.0-...-57762c0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID          int         `bson:"_id" json:"id" structs:"id" db:"id"`
	Name        string      `bson:"name" json:"name" structs:"name" db:"name"`
	AccountType string      `bson:"account_type" json:"accountType" structs:"accountType" db:"accountType"`
	AccountData interface{} `bson:"account_data" json:"accountData" structs:"accountData" db:"accountData"`
	CreatedAt   time.Time   `bson:"created_at" json:"createdAt" db:"createdAt" structs:"createdAt"`
	UpdatedAt   time.Time   `bson:"updated_at" json:"updatedAt" db:"updatedAt" structs:"updatedAt"`
}

func (*Account) GetAccountTypes

func (c *Account) GetAccountTypes() []string

func (*Account) GetNames

func (c *Account) GetNames() []string

func (*Account) Map

func (c *Account) Map() map[string]interface{}

type Class

type Class struct {
	ID        int       `bson:"_id" json:"id" structs:"id" db:"id"`
	Name      string    `bson:"name" json:"name" structs:"name" db:"name"`
	Students  []int     `bson:"students" json:"students" structs:"students" db:"students"`
	CreatedAt time.Time `bson:"created_at" json:"createdAt" db:"createdAt" structs:"createdAt"`
	UpdatedAt time.Time `bson:"updated_at" json:"updatedAt" db:"updatedAt" structs:"updatedAt"`
}

func (*Class) GetNames

func (c *Class) GetNames() []string

func (*Class) Map

func (c *Class) Map() map[string]interface{}

type Student

type Student struct {
	ID        int       `bson:"_id" json:"id" structs:"id" db:"id"`
	Name      string    `bson:"name" json:"name" structs:"name" db:"name"`
	GPA       float64   `bson:"gpa" json:"GPA" structs:"gpa" db:"gpa"`
	Subjects  []int     `bson:"subjects" json:"subjects" structs:"subjects" db:"subjects"`
	CreatedAt time.Time `bson:"created_at" json:"createdAt" structs:"createdAt" db:"createdAt"`
	UpdatedAt time.Time `bson:"updated_at" json:"updatedAt" structs:"updatedAt" db:"updatedAt"`
}

func (*Student) GetNames

func (c *Student) GetNames() []string

func (*Student) Map

func (c *Student) Map() map[string]interface{}

type StudentAccount

type StudentAccount struct {
	StudentID             int  `bson:"student_id" json:"studentID" structs:"studentID" db:"studentID"`
	TotalInstallments     int  `bson:"total_installments" json:"totalInstallments" structs:"totalInstallments" db:"totalInstallments"`
	RemainingInstallments int  `bson:"remaining_installments" json:"remainingInstallments" structs:"remainingInstallments" db:"remainingInstallments"`
	IsDefaulter           bool `bson:"is_defaulter" json:"isDefaulter" structs:"isDefaulter" db:"isDefaulter"`
}

type Subject

type Subject struct {
	ID        int       `json:"id" bson:"_id" structs:"id" db:"id"`
	Name      string    `json:"name" bson:"name" structs:"name" db:"name"`
	ClassID   int       `json:"class_id" bson:"class_id" db:"class_id" structs:"class_id"`
	CreatedAt time.Time `bson:"created_at" json:"createdAt" db:"createdAt" structs:"createdAt"`
	UpdatedAt time.Time `bson:"updated_at" json:"updatedAt" db:"updatedAt" structs:"updatedAt"`
}

func (*Subject) GetNames

func (s *Subject) GetNames() []string

func (*Subject) Map

func (s *Subject) Map() map[string]interface{}

type Teacher

type Teacher struct {
	ID        int       `bson:"_id,omitempty" json:"id" db:"id" structs:"id"`
	Name      string    `bson:"name" json:"name" db:"name" structs:"name"`
	SubjectID int       `bson:"subject_id" json:"subject_id" db:"subject_id" structs:"subject_id"`
	CreatedAt time.Time `bson:"created_at" json:"createdAt" db:"createdAt" structs:"createdAt"`
	UpdatedAt time.Time `bson:"updated_at" json:"updatedAt" db:"updatedAt" structs:"updatedAt"`
}

func (*Teacher) GetNames

func (t *Teacher) GetNames() []string

func (*Teacher) Map

func (t *Teacher) Map() map[string]interface{}

type TeacherAccount

type TeacherAccount struct {
	TeacherID int `bson:"teacher_id" json:"teacherID" structs:"teacherID" db:"teacherID"`
	Salary    int `bson:"salary" json:"salary" structs:"salary" db:"salary"`
}

Jump to

Keyboard shortcuts

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