Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct { ID string `json:"id,omitempty" gorm:"primary_key;comment:'部門編號'"` //部門編號 Name string `json:"name,omitempty" gorm:"comment:'部門名稱'"` //部門名稱 PreviousDepartment *Department `json:"previousDepartment,omitempty" gorm:"foreignkey:PreviousDepartmentID;association_foreignkey:ID"` //上級部門 PreviousDepartmentID string `json:"previousDepartmentID,omitempty" gorm:"comment:'上級部門'"` //上級部門 ID }
Department 部門模型
func (*Department) GetPreviousDepartment ¶
func (d *Department) GetPreviousDepartment() DepartmentModelInterface
GetPreiousDepartment 用於取得上級部門
type DepartmentModelInterface ¶
type DepartmentModelInterface interface { GetID() string GetName() string GetPreviousDepartment() DepartmentModelInterface }
DepartmentModelInterface 部門模型的實作介面
type StartupInterface ¶
type StartupInterface interface { }
type User ¶
type User struct { ID string `json:"id,omitempty" gorm:"primary_key;comment:'使用者 ID'"` //使用者 ID Username string `json:"username,omitempty" gorm:"comment:'使用者名稱'"` //使用者名稱 Email string `json:"email,omitempty" gorm:"comment:'信箱'"` //使用者信箱 QQ string `json:"qq,omitempty" gorm:"comment:'QQ'"` //使用者QQ Location string `location:"email,omitempty" gorm:"comment:'所在地'"` //所在地 EXT int `json:"ext,omitempty" gorm:"comment:'分機'"` //分機 Department *Department `json:"department,omitempty" gorm:"foreignkey:departmentID;association_foreignkey:ID"` //部門 DepartmentID string `json:"departmentID,omitempty" gorm:"comment:'部門'"` //部門 ID }
User
func (*User) GetDepartment ¶
func (u *User) GetDepartment() DepartmentModelInterface
GetDepartment 用於取得使用者部門
type UserModelInterface ¶
type UserModelInterface interface { GetID() string GetUserName() string GetEmail() string GetQQ() string GetLocation() string GetEXT() int GetDepartment() DepartmentModelInterface }
UserModelInterface User 模型的實作介面
Click to show internal directories.
Click to hide internal directories.