'integer', 'coupon_client' => 'integer', 'coupon_type' => 'integer', 'coupon_status' => 'integer', 'distribution_object' => 'integer', 'application_scope' => 'integer', 'is_display' => 'integer', 'distribution_with_day' => 'integer', 'coupon_count' => 'integer', 'coupon_take_count' => 'integer', 'coupon_ used_count' => 'integer', 'valid_type' => 'integer', 'valid_days' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime']; protected string $primaryKey = "coupon_id"; /** * 获取-单条 * @param array $params * @param array $fields * @return object|null */ public static function getOne(array $params, array $fields = ['*']): object|null { return self::where($params)->first($fields); } /** * 获取信息-多条 * @param array $params * @param array $fields * @return object|null */ public static function getList(array $params, array $fields = ['*']): object|null { return self::where($params)->get($fields); } }