package dao

import (
	"ordonnance/common/db"
	"ordonnance/server/model"
	"time"
)

func GetValidBulletin() (list []model.Bulletin, err error) {
	now := time.Now().Format("2006-01-02 15:04:05")
	err = db.GDB.Where("startTime<? and endTime>? AND status=0", now, now).Find(&list).Error
	return
}
