<?php

    namespace App\System\Vendor;
    use App\System\Basic\beModel;

    class beAlert {
        public static function beCreateAlert($message,$link,$uid = 0){
            if($uid == 0){
                $user = Auth::beGetUser();
                $uid = $user["uid"];
            }
            $aid = beModel::beInsert([
                "uid" => $uid,
                "afuid" => 0,
                "ainfo" => $message,
                "alink" => $link,
                "astatus" => "0",
                "areadtime" => 0,
                "adateline" => BE_TIME
            ],"be_alerts");
            return ["success" => true,"aid" => $aid];
        }
    }
?>