student

package
v0.0.0-...-7b661e0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ContractPriceStatusLock = 1
View Source
const ContractPriceStatusUnlock = 0
View Source
const ContractStatusBack = 2
View Source
const ContractStatusDelete = -1
View Source
const ContractStatusValid = 0
View Source
const ContractTypeTuo = 2
View Source
const ContractTypeXiao = 1
View Source
const ContractTypeYi = 0
View Source
const StudentStatusDelete = -1
View Source
const StudentStatusInit = 0
View Source
const StudentStatusStop = 2
View Source
const StudentStatusValid = 1
View Source
const StudentType = 0
View Source
const TeamType = 1

Variables

View Source
var ContractTypeMap = map[int]string{0: "一对一", 1: "小班", 2: "托班"}
View Source
var StudentGradeMap = map[int]string{1: "幼小", 2: "幼中", 3: "幼大", 10: "一年级", 20: "二年级", 30: "三年级", 40: "四年级", 50: "五年级", 60: "六年级", 70: "初一", 80: "初二", 90: "初三", 100: "高一", 110: "高二", 120: "高三"}
View Source
var StudentTypeMap = []string{"未报名", "正常", "禁用"}

Functions

func GetContractTypeName

func GetContractTypeName(ctype int) string

func GetGradeName

func GetGradeName(grade int) string

func StudentDelete

func StudentDelete(ids []int) (int64, error)

Delete 批量删除

Types

type Common

type Common struct {
	ID        uint `gorm:"primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Contract

type Contract struct {
	Id              int       `json:"id"`
	Student         *Student  `orm:"rel(one)"`
	Type            int       `json:"type"`
	Price           int       `json:"price"`
	Quantity        float64   `json:"quantity"`
	SurplusQuantity float64   `json:"surplus_quantity"`
	Amount          float64   `json:"amount"`
	Surplus         float64   `json:"surplus"`
	Payment         string    `json:"payment"`
	CreatedAt       time.Time `json:"created_at"`
	UpdateAt        time.Time `json:"update_at"`
	Status          int       `json:"status"`
	EndAt           string
}

func ChooseContract

func ChooseContract(stuId, ctype int, length float64) (foo []Contract, err error)

func ContractDataList

func ContractDataList(params *ContractQueryParam) []*Contract

RoleDataList 获取学校列表

func ContractPageList

func ContractPageList(params *ContractQueryParam) ([]*Contract, int64)

RolePageList 获取分页数据

func (*Contract) TableName

func (m *Contract) TableName() string

type ContractPrice

type ContractPrice struct {
	Id        int `json:"id"`
	Type      int `json:"type"`
	Grade     int `json:"grade"`
	SchoolId  int `json:"school_id"`
	Lower     int `json:"lower"`
	Upper     int `json:"upper"`
	Status1   int `json:"status1"`
	Status2   int `json:"status2"`
	Status3   int `json:"status3"`
	Status10  int `json:"status10"`
	Status20  int `json:"status20"`
	Status30  int `json:"status30"`
	Status40  int `json:"status40"`
	Status50  int `json:"status50"`
	Status60  int `json:"status60"`
	Status70  int `json:"status70"`
	Status80  int `json:"status80"`
	Status90  int `json:"status90"`
	Status100 int `json:"status100"`
	Status110 int `json:"status110"`
	Status120 int `json:"status120"`
	Grade1    int `json:"grade1"`
	Grade2    int `json:"grade2"`
	Grade3    int `json:"grade3"`
	Grade10   int `json:"grade10"`
	Grade20   int `json:"grade20"`
	Grade30   int `json:"grade30"`
	Grade40   int `json:"grade40"`
	Grade50   int `json:"grade50"`
	Grade60   int `json:"grade60"`
	Grade70   int `json:"grade70"`
	Grade80   int `json:"grade80"`
	Grade90   int `json:"grade90"`
	Grade100  int `json:"grade100"`
	Grade110  int `json:"grade110"`
	Grade120  int `json:"grade120"`
}

func (*ContractPrice) Search

func (m *ContractPrice) Search(ctype, grade int, length float64) (price ContractPrice, err error)

func (*ContractPrice) TableName

func (m *ContractPrice) TableName() string

type ContractQueryParam

type ContractQueryParam struct {
	models.BaseQueryParam
	SchoolId        string
	NameLike        string
	DateStart       string
	DateEnd         string
	Status          string
	DateStartRefund string
	DateEndRefund   string
}

RoleQueryParam 用于搜索的类

type School

type School struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func SchoolDataList

func SchoolDataList(params *SchoolQueryParam) []*School

RoleDataList 获取学校列表

func SchoolPageList

func SchoolPageList(params *SchoolQueryParam) ([]*School, int64)

RolePageList 获取分页数据

func (*School) TableName

func (m *School) TableName() string

type SchoolQueryParam

type SchoolQueryParam struct {
	models.BaseQueryParam
	NameLike string
}

RoleQueryParam 用于搜索的类

type Student

type Student struct {
	Id             int            `json:"id"`
	Name           string         `json:"name"`
	Code           string         `json:"code"`
	Type           int            `json:"type"`
	Sex            string         `json:"sex"`
	Guarder        string         `json:"guarder"`
	Relate         string         `json:"relate"`
	Grade          int            `json:"grade"`
	Contact1       string         `json:"contact1"`
	Contact2       string         `json:"contact2"`
	School         *School        `orm:"rel(one)"`
	StudentSchool  *StudentSchool `orm:"rel(one)"`
	Adress         string         `json:"adress"`
	Note           string         `json:"note"`
	CreatedAt      time.Time      `json:"created_at"`
	UpdatedAt      time.Time      `json:"updated_at"`
	Status         int            `json:"status"`
	GroupId        string         `json:"group_id"`
	GroupName      string         `json:"group_name"`
	Balance1       float64        `json:"balance1"`
	Balance1Length float64        `json:"balance1_length"`
	Balance2       float64        `json:"balance2"`
	Balance2Length float64        `json:"balance2_length"`
	Balance3       float64        `json:"balance3"`
	Balance3Length float64        `json:"balance3_length"`
}

func StudentDataList

func StudentDataList(params *StudentQueryParam) []*Student

RoleDataList 获取学生列表

func StudentPageList

func StudentPageList(params *StudentQueryParam) ([]*Student, int64)

StudentPageList 获取分页数据

func (*Student) TableName

func (m *Student) TableName() string

type StudentArea

type StudentArea struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func StudentAreaDataList

func StudentAreaDataList(params *StudentAreaQueryParam) []*StudentArea

RoleDataList 获取角色列表

func StudentAreaPageList

func StudentAreaPageList(params *StudentAreaQueryParam) ([]*StudentArea, int64)

RolePageList 获取分页数据

func (*StudentArea) TableName

func (m *StudentArea) TableName() string

type StudentAreaQueryParam

type StudentAreaQueryParam struct {
	models.BaseQueryParam
	NameLike string
}

RoleQueryParam 用于搜索的类

type StudentQueryParam

type StudentQueryParam struct {
	models.BaseQueryParam
	Type            int
	NameLike        string
	SchoolId        string
	StudentSchoolId string
	Adress          string
	Grade           string
	Status          string
	DateStart       string
	DateEnd         string
	Balance2        string
	BalanceRate     string
	ContractType    string
}

RoleQueryParam 用于搜索的类

type StudentSchool

type StudentSchool struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func StudentSchoolDataList

func StudentSchoolDataList(params *StudentSchoolQueryParam) []*StudentSchool

RoleDataList 获取角色列表

func StudentSchoolPageList

func StudentSchoolPageList(params *StudentSchoolQueryParam) ([]*StudentSchool, int64)

RolePageList 获取分页数据

func (*StudentSchool) TableName

func (m *StudentSchool) TableName() string

type StudentSchoolQueryParam

type StudentSchoolQueryParam struct {
	models.BaseQueryParam
	NameLike string
}

RoleQueryParam 用于搜索的类

Jump to

Keyboard shortcuts

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