package yuyue

import(
	"zhenyihuibao/conf"
	"errors"
	)

//每日时段
type YuyueDayRule struct {
	Id        	int   	`json:"id"`
	Type 		int 	`json:"type"`
	Name   		string 	`json:"name"`
	StartTime 	string 	`json:"start_time"`
	EndTime   	string 	`json:"end_time"`
}

func (this *YuyueDayRule) GetRowById(id int) (row *YuyueDayRule, err error){
	rowModel := &YuyueDayRule{Id:id}
	has, err := conf.SqlServer.Get(rowModel)
	if err != nil || has == false {
		err =  errors.New("找不到每日时段信息!")
		return
	}
	row = rowModel
	return
}