Documentation
¶
Index ¶
- func AddCandidate(candidate Candidate) error
- func AddMatchRecord(record *MatchRecord) error
- func CheckAuth(username, password string) (bool, error)
- func CloseDB()
- func Setup()
- func UpdateCandidate(candidate Candidate) error
- func UpdateMatchRecord(id int64, gender Gender) error
- func WriteDB() *gorm.DB
- type Attitude
- type Auth
- type Candidate
- type CandidateStatus
- type ConfirmStatus
- type Gender
- type MatchRecord
- type Model
- type SendStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCandidate ¶
func AddMatchRecord ¶
func AddMatchRecord(record *MatchRecord) error
func UpdateCandidate ¶
func UpdateMatchRecord ¶
Types ¶
type Candidate ¶
type Candidate struct {
ID int64 `gorm:"primary_key;column:id" json:"id"`
Gender Gender `gorm:"column:gender" json:"gender"`
Email string `gorm:"column:email" json:"email"`
Age int64 `gorm:"column:age" json:"age"`
Status CandidateStatus `gorm:"column:status" json:"status"`
UpdateTime int64 `gorm:"column:update_time" json:"update_time"`
CreateTime int64 `gorm:"column:create_time" json:"create_time"`
}
func GetCandidateByEmail ¶
func GetCandidateList ¶
type CandidateStatus ¶
type CandidateStatus int
const ( CandidateStatusOk CandidateStatus = 1 CandidateStatusStop CandidateStatus = 2 )
type ConfirmStatus ¶
type ConfirmStatus int
const ( ConfirmStatusUnknown ConfirmStatus = 0 ConfirmStatusOk ConfirmStatus = 1 )
type MatchRecord ¶
type MatchRecord struct {
ID int64 `gorm:"primary_key;column:id" json:"id"`
MaleID int64 `gorm:"column:male_id" json:"male_id"`
FemaleID int64 `gorm:"column:female_id" json:"female_id"`
MaleEmail string `gorm:"column:male_email" json:"male_email"`
FemaleEmail string `gorm:"column:female_email" json:"female_email"`
CreateTime int64 `gorm:"column:create_time" json:"create_time"`
MaleSendStatus SendStatus `gorm:"column:male_send_status" json:"male_send_status"`
FemaleSendStatus SendStatus `gorm:"column:female_send_status" json:"female_send_status"`
ConfirmStatus ConfirmStatus `gorm:"column:confirm_status" json:"confirm_status"` // TODO 这里男女生都需要有个确认状态
MatchResult Attitude `gorm:"column:match_result" json:"match_result"`
MaleAttitude Attitude `gorm:"column:male_attitude" json:"male_attitude"`
FemaleAttitude Attitude `gorm:"column:female_attitude" json:"female_attitude"`
MaleNote string `gorm:"column:male_note" json:"male_note"`
FemaleNote string `gorm:"column:female_note" json:"female_note"`
}
func GetMatchRecordList ¶
func GetMatchRecordList() ([]MatchRecord, error)
type SendStatus ¶
type SendStatus int
const ( SendStatusNo SendStatus = 0 SendStatusOK SendStatus = 1 )
Click to show internal directories.
Click to hide internal directories.