Documentation ¶
Index ¶
- type IProjectRepository
- type ProjectRepository
- func (a *ProjectRepository) AddProject(Project *models.Project) bool
- func (a *ProjectRepository) DeleteProject(id uint) bool
- func (a *ProjectRepository) ExistProjectByName(where interface{}) bool
- func (a *ProjectRepository) GetProject(where interface{}) *models.Project
- func (a *ProjectRepository) GetProjects(PageNum uint, PageSize uint, total *uint64, where interface{}) *[]models.Project
- func (a *ProjectRepository) UpdateProject(Project *models.Project) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IProjectRepository ¶
type IProjectRepository interface { //GetProject 根据id获取Project GetProject(where interface{}) *models.Project //AddProject 新增Project AddProject(Project *models.Project) bool //UpdateProject 更新Project UpdateProject(Project *models.Project) bool //GetProjects 获取Project GetProjects(PageNum, PageSize uint, total *uint64, where interface{}) *[]models.Project //ExistProjectByName 是否存在已有应用 ExistProjectByName(where interface{}) bool //DeleteProject 删除已有应用 DeleteProject(id uint) bool }
IProjectRepository Project接口定义
type ProjectRepository ¶
type ProjectRepository struct { Log logger.ILogger `inject:""` Base baseRep.BaseRepository `inject:"inline"` }
ProjectRepository 注入IDb
func (*ProjectRepository) AddProject ¶
func (a *ProjectRepository) AddProject(Project *models.Project) bool
AddProject 新增Project
func (*ProjectRepository) DeleteProject ¶
func (a *ProjectRepository) DeleteProject(id uint) bool
DeleteProject 删除Project
func (*ProjectRepository) ExistProjectByName ¶
func (a *ProjectRepository) ExistProjectByName(where interface{}) bool
ExistProjectByName 判断Project是否已存在
func (*ProjectRepository) GetProject ¶
func (a *ProjectRepository) GetProject(where interface{}) *models.Project
GetProject 根据id获取Project
func (*ProjectRepository) GetProjects ¶
func (a *ProjectRepository) GetProjects(PageNum uint, PageSize uint, total *uint64, where interface{}) *[]models.Project
GetProjects 获取项目列表
func (*ProjectRepository) UpdateProject ¶
func (a *ProjectRepository) UpdateProject(Project *models.Project) bool
UpdateProject 更新Project
Click to show internal directories.
Click to hide internal directories.