package dao

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

// 获取 药方
func GetOrdonnance(id interface{}) (info model.Ordonnance, err error) {
	err = db.GDB.Where("ordonnance_id=?", id).First(&info).Error
	return
}

// 获取 药剂量
func GetOrdonnanceItemList(id interface{}) (list []model.OrdonnanceItem, err error) {
	err = db.GDB.Where("ordonnance_id=?", id).Find(&list).Error
	return
}
