65 lines
2.2 KiB
Go
65 lines
2.2 KiB
Go
package proto
|
||
|
||
import "service/library/validator"
|
||
|
||
func (p *ApiCreateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
//params = append(params, validator.NewInt64PtrParam("请确认创建动态的用户id!", p.Moment.Mid))
|
||
params = append(params, validator.NewInt64PtrParam("请确认创建动态的可见范围!", p.Moment.Status))
|
||
params = append(params, validator.NewStructPtrParam("动态内容不能为空!", p.Moment))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiDeleteReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
params = append(params, validator.NewInt64PtrParam("请确认待删除动态的id!", p.Id))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiUpdateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
params = append(params, validator.NewInt64PtrParam("请确认待更新动态的id!", p.Moment.Id))
|
||
//params = append(params, validator.NewStructPtrParam("动态内容不能为空!", p.Moment))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiListByMidReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
//params = append(params, validator.NewInt64PtrParam("请输入待查询动态的用户id!", p.Mid))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiListByMidsReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
params = append(params, validator.NewInt64SliceParam("请输入待查询动态的用户id数组!", p.Mids))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiListByIdsReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
params = append(params, validator.NewInt64SliceParam("请输入待查询动态的id列表!", p.Ids))
|
||
|
||
return
|
||
}
|
||
|
||
func (p *ApiThumbsUpReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
||
params = make([]*validator.JsonParam, 0)
|
||
|
||
params = append(params, validator.NewInt64PtrParam("请输入待点赞动态的id!", p.MomentId))
|
||
//params = append(params, validator.NewInt64PtrParam("请输入点赞动态的用户id!", p.Mid))
|
||
params = append(params, validator.NewInt64PtrParam("请输入点赞动态的次数!", p.Times))
|
||
|
||
return
|
||
}
|